algolia 3.34.4 → 3.35.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03d6bce34fbba23cd559298792898bbc4d1e3a3b68a57a842192dc6fc0334e2c
4
- data.tar.gz: 9d30d5f50c4ece4c836738ef426988ebf7362dde85a4e544aba968ea96cd6a8b
3
+ metadata.gz: ed9225f3ee712ee510d7e5ec50de5224f13c3c6ec128ab8ce321a2f37515000c
4
+ data.tar.gz: d5b7a0e0bc1f1fda4ec306f4ad83949b8e2235136463baeff81a6ac833d631f7
5
5
  SHA512:
6
- metadata.gz: b02665f3d715e8e109304d231009c8b1d4c53704b6f5ca74f359182ba5c0ac99b6a07305080f50f396e8ea6e39a29b6f9f27b8acf62713674ee1a866c15583b5
7
- data.tar.gz: df7b681f76666269eeebb9e8092e17bea31add145e059d79b8ffcbbcd87787e4259d6f8eb4340c1f55d9c16aa8fe4290487f139bd26fb4add962df28a9474121
6
+ metadata.gz: 3f3f07f51bb0ef9f91c64b91f83756b6ef1be282568df60911c0e9bcef6fbc7a07c431fc72266b6ac557f46e372bfa1b34e91e1ccc168971c0588d8040a487af
7
+ data.tar.gz: 20e2455d1b6bf30b08b8aa048bf19bc1bb0c180bee3c235e4c8471364df289abe83c5c01b1dfd91b21a9468100ab75815be68f5821e3fc512cbf9d2a18ec2a1f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [3.35.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.34.4...3.35.0)
2
+
3
+ BREAKING CHANGES: this minor version includes multiple breaking changes related to fixes on different APIs. See below for more details.
4
+
5
+ - [b39e3e013](https://github.com/algolia/api-clients-automation/commit/b39e3e013) feat(specs): `conditions` is not required anymore in composition rules ([#5853](https://github.com/algolia/api-clients-automation/pull/5853)) by [@ClaraMuller](https://github.com/ClaraMuller/)
6
+ - [9ef126ccd](https://github.com/algolia/api-clients-automation/commit/9ef126ccd) docs(SearchParams): Document that filter scores are supported in virtual replicas ([#5716](https://github.com/algolia/api-clients-automation/pull/5716)) by [@NixFrog](https://github.com/NixFrog/)
7
+ - [6a3e60802](https://github.com/algolia/api-clients-automation/commit/6a3e60802) fix(specs): BREAKING CHANGE – remove baseRecommendRequest from trendingFacets [CR-10264] ([#5858](https://github.com/algolia/api-clients-automation/pull/5858)) by [@raed667](https://github.com/raed667/)
8
+ - The `TrendingFacets` model has been updated to reflect the API response.
9
+ - [f9453e693](https://github.com/algolia/api-clients-automation/commit/f9453e693) docs: BREAKING CHANGE – authentication type can't be updated ([#5824](https://github.com/algolia/api-clients-automation/pull/5824)) by [@sbellone](https://github.com/sbellone/)
10
+ - The `AuthenticationUpdate` model has been updated to reflect that the `type` field can't be updated.
11
+ - [52aed5b35](https://github.com/algolia/api-clients-automation/commit/52aed5b35) fix(specs): allow additionalProperties on insights-api events ([#5885](https://github.com/algolia/api-clients-automation/pull/5885)) by [@sirockin](https://github.com/sirockin/)
12
+ - [2925f56d1](https://github.com/algolia/api-clients-automation/commit/2925f56d1) fix(specs): BREAKING CHANGE – more accurate composition behavior typing ([#5892](https://github.com/algolia/api-clients-automation/pull/5892)) by [@gavinwade12](https://github.com/gavinwade12/)
13
+ - The `CompositionBehavior` model is now a union type for better accuracy.
14
+ - [63b0c5464](https://github.com/algolia/api-clients-automation/commit/63b0c5464) feat(specs): BREAKING CHANGE – Ingestion API: new `code` property in oauth authentication ([#5897](https://github.com/algolia/api-clients-automation/pull/5897)) by [@sbellone](https://github.com/sbellone/)
15
+ - The `AuthOAuth` and `AuthOAuthPartial` models have been updated to reflect that the `clientId` field is now optional, and the `code` field can be set.
16
+
1
17
  ## [3.34.4](https://github.com/algolia/algoliasearch-client-ruby/compare/3.34.3...3.34.4)
2
18
 
3
19
  - [f02ab6fa0](https://github.com/algolia/api-clients-automation/commit/f02ab6fa0) chore: agentic config prep ([#5825](https://github.com/algolia/api-clients-automation/pull/5825)) by [@Fluf22](https://github.com/Fluf22/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.34.4)
4
+ algolia (3.35.0)
5
5
  base64 (>= 0.2.0, < 1)
6
6
  faraday (>= 1.0.1, < 3.0)
7
7
  faraday-net_http_persistent (>= 0.15, < 3)
@@ -7,200 +7,101 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Composition
10
- class CompositionBehavior
11
- attr_accessor :injection
12
-
13
- # Attribute mapping from ruby-style variable name to JSON key.
14
- def self.attribute_map
15
- {
16
- :injection => :injection
17
- }
18
- end
19
-
20
- # Attribute type mapping.
21
- def self.types_mapping
22
- {
23
- :injection => :"Injection"
24
- }
25
- end
26
-
27
- # List of attributes with nullable: true
28
- def self.openapi_nullable
29
- Set.new(
30
- []
31
- )
32
- end
33
-
34
- # Initializes the object
35
- # @param [Hash] attributes Model attributes in the form of hash
36
- def initialize(attributes = {})
37
- if (!attributes.is_a?(Hash))
38
- raise(
39
- ArgumentError,
40
- "The input argument (attributes) must be a hash in `Algolia::CompositionBehavior` initialize method"
41
- )
10
+ # An object containing either an `injection` or `multifeed` behavior schema, but not both.
11
+ module CompositionBehavior
12
+ class << self
13
+ # List of class defined in oneOf (OpenAPI v3)
14
+ def openapi_one_of
15
+ [
16
+ :"CompositionInjectionBehavior",
17
+ :"CompositionMultifeedBehavior"
18
+ ]
42
19
  end
43
20
 
44
- # check to see if the attribute exists and convert string to symbol for hash key
45
- attributes = attributes.each_with_object({}) { |(k, v), h|
46
- if (!self.class.attribute_map.key?(k.to_sym))
47
- raise(
48
- ArgumentError,
49
- "`#{k}` is not a valid attribute in `Algolia::CompositionBehavior`. Please check the name to make sure it's valid. List of attributes: " +
50
- self.class.attribute_map.keys.inspect
51
- )
21
+ # Builds the object
22
+ # @param [Mixed] Data to be matched against the list of oneOf items
23
+ # @return [Object] Returns the model or the data itself
24
+ def build(data)
25
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
26
+ # Note:
27
+ # - We do not attempt to check whether exactly one item matches.
28
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
29
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
30
+ # - TODO: scalar values are de facto behaving as if they were nullable.
31
+ # - TODO: logging when debugging is set.
32
+ openapi_one_of.each do |klass|
33
+ begin
34
+ # "nullable: true"
35
+ next if klass == :AnyType
36
+ typed_data = find_and_cast_into_type(klass, data)
37
+ return typed_data if typed_data
38
+ # rescue all errors so we keep iterating even if the current item lookup raises
39
+ rescue
40
+ end
52
41
  end
53
42
 
54
- h[k.to_sym] = v
55
- }
56
-
57
- if attributes.key?(:injection)
58
- self.injection = attributes[:injection]
59
- else
60
- self.injection = nil
43
+ openapi_one_of.include?(:AnyType) ? data : nil
61
44
  end
62
- end
63
45
 
64
- # Checks equality by comparing each attribute.
65
- # @param [Object] Object to be compared
66
- def ==(other)
67
- return true if self.equal?(other)
68
- self.class == other.class &&
69
- injection == other.injection
70
- end
71
-
72
- # @see the `==` method
73
- # @param [Object] Object to be compared
74
- def eql?(other)
75
- self == other
76
- end
77
-
78
- # Calculates hash code according to all attributes.
79
- # @return [Integer] Hash code
80
- def hash
81
- [injection].hash
82
- end
83
-
84
- # Builds the object from hash
85
- # @param [Hash] attributes Model attributes in the form of hash
86
- # @return [Object] Returns the model itself
87
- def self.build_from_hash(attributes)
88
- return nil unless attributes.is_a?(Hash)
89
- attributes = attributes.transform_keys(&:to_sym)
90
- transformed_hash = {}
91
- types_mapping.each_pair do |key, type|
92
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
93
- transformed_hash[key.to_sym] = nil
94
- elsif type =~ /\AArray<(.*)>/i
95
- # check to ensure the input is an array given that the attribute
96
- # is documented as an array but the input is not
97
- if attributes[attribute_map[key]].is_a?(Array)
98
- transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
99
- _deserialize(::Regexp.last_match(1), v)
100
- }
46
+ private
47
+
48
+ SchemaMismatchError = Class.new(StandardError)
49
+
50
+ def find_and_cast_into_type(klass, data)
51
+ return if data.nil?
52
+
53
+ case klass.to_s
54
+ when "Boolean"
55
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
56
+ when "Float"
57
+ return data if data.instance_of?(Float)
58
+ when "Integer"
59
+ return data if data.instance_of?(Integer)
60
+ when "Time"
61
+ return Time.parse(data)
62
+ when "Date"
63
+ return Date.parse(data)
64
+ when "String"
65
+ return data if data.instance_of?(String)
66
+ # "type: object"
67
+ when "Object"
68
+ return data if data.instance_of?(Hash)
69
+ # "type: array"
70
+ when /\AArray<(?<sub_type>.+)>\z/
71
+ if data.instance_of?(Array)
72
+ sub_type = Regexp.last_match[:sub_type]
73
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
101
74
  end
102
- elsif !attributes[attribute_map[key]].nil?
103
- transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
104
- end
105
- end
106
-
107
- new(transformed_hash)
108
- end
109
-
110
- # Deserializes the data based on type
111
- # @param string type Data type
112
- # @param string value Value to be deserialized
113
- # @return [Object] Deserialized data
114
- def self._deserialize(type, value)
115
- case type.to_sym
116
- when :Time
117
- Time.parse(value)
118
- when :Date
119
- Date.parse(value)
120
- when :String
121
- value.to_s
122
- when :Integer
123
- value.to_i
124
- when :Float
125
- value.to_f
126
- when :Boolean
127
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
128
- true
75
+ # "type: object" with "additionalProperties: { ... }"
76
+ when /\AHash<String, (?<sub_type>.+)>\z/
77
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
78
+ sub_type = Regexp.last_match[:sub_type]
79
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
80
+ end
81
+ # model
129
82
  else
130
- false
131
- end
132
-
133
- when :Object
134
- # generic object (usually a Hash), return directly
135
- value
136
- when /\AArray<(?<inner_type>.+)>\z/
137
- inner_type = Regexp.last_match[:inner_type]
138
- value.map { |v| _deserialize(inner_type, v) }
139
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
- k_type = Regexp.last_match[:k_type]
141
- v_type = Regexp.last_match[:v_type]
142
- {}.tap do |hash|
143
- value.each do |k, v|
144
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
83
+ const = Algolia::Composition.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_one_of)
86
+ # nested oneOf model
87
+ model = const.build(data)
88
+ elsif const.respond_to?(:discriminator_attributes)
89
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
90
+ model = const.build_from_hash(data)
91
+ end
92
+ else
93
+ # maybe it's an enum, or doens't have discriminators
94
+ model = const.build_from_hash(data)
95
+ end
96
+
97
+ return model if model
145
98
  end
146
99
  end
147
- # model
148
- else
149
- # models (e.g. Pet) or oneOf
150
- klass = Algolia::Composition.const_get(type)
151
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
152
- .build_from_hash(value)
153
- end
154
- end
155
-
156
- # Returns the string representation of the object
157
- # @return [String] String presentation of the object
158
- def to_s
159
- to_hash.to_s
160
- end
161
-
162
- # to_body is an alias to to_hash (backward compatibility)
163
- # @return [Hash] Returns the object in the form of hash
164
- def to_body
165
- to_hash
166
- end
167
100
 
168
- def to_json(*_args)
169
- to_hash.to_json
170
- end
171
-
172
- # Returns the object in the form of hash
173
- # @return [Hash] Returns the object in the form of hash
174
- def to_hash
175
- hash = {}
176
- self.class.attribute_map.each_pair do |attr, param|
177
- value = send(attr)
178
- if value.nil?
179
- is_nullable = self.class.openapi_nullable.include?(attr)
180
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
- end
182
-
183
- hash[param] = _to_hash(value)
184
- end
185
-
186
- hash
187
- end
188
-
189
- # Outputs non-array value in the form of hash
190
- # For object, use to_hash. Otherwise, just return the value
191
- # @param [Object] value Any valid value
192
- # @return [Hash] Returns the value in the form of hash
193
- def _to_hash(value)
194
- if value.is_a?(Array)
195
- value.compact.map { |v| _to_hash(v) }
196
- elsif value.is_a?(Hash)
197
- {}.tap do |hash|
198
- value.each { |k, v| hash[k] = _to_hash(v) }
199
- end
200
- elsif value.respond_to?(:to_hash)
201
- value.to_hash
202
- else
203
- value
101
+ # if no match by now, raise
102
+ raise
103
+ rescue
104
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
204
105
  end
205
106
  end
206
107
  end
@@ -0,0 +1,209 @@
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 Composition
10
+ # An object containing an `injection` behavior.
11
+ class CompositionInjectionBehavior
12
+ attr_accessor :injection
13
+
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ :injection => :injection
18
+ }
19
+ end
20
+
21
+ # Attribute type mapping.
22
+ def self.types_mapping
23
+ {
24
+ :injection => :"Injection"
25
+ }
26
+ end
27
+
28
+ # List of attributes with nullable: true
29
+ def self.openapi_nullable
30
+ Set.new(
31
+ []
32
+ )
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ raise(
40
+ ArgumentError,
41
+ "The input argument (attributes) must be a hash in `Algolia::CompositionInjectionBehavior` initialize method"
42
+ )
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ raise(
49
+ ArgumentError,
50
+ "`#{k}` is not a valid attribute in `Algolia::CompositionInjectionBehavior`. Please check the name to make sure it's valid. List of attributes: " +
51
+ self.class.attribute_map.keys.inspect
52
+ )
53
+ end
54
+
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:injection)
59
+ self.injection = attributes[:injection]
60
+ else
61
+ self.injection = nil
62
+ end
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(other)
68
+ return true if self.equal?(other)
69
+ self.class == other.class &&
70
+ injection == other.injection
71
+ end
72
+
73
+ # @see the `==` method
74
+ # @param [Object] Object to be compared
75
+ def eql?(other)
76
+ self == other
77
+ end
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Integer] Hash code
81
+ def hash
82
+ [injection].hash
83
+ end
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def self.build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ attributes = attributes.transform_keys(&:to_sym)
91
+ transformed_hash = {}
92
+ types_mapping.each_pair do |key, type|
93
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
94
+ transformed_hash[key.to_sym] = nil
95
+ elsif type =~ /\AArray<(.*)>/i
96
+ # check to ensure the input is an array given that the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[attribute_map[key]].is_a?(Array)
99
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
100
+ _deserialize(::Regexp.last_match(1), v)
101
+ }
102
+ end
103
+ elsif !attributes[attribute_map[key]].nil?
104
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
105
+ end
106
+ end
107
+
108
+ new(transformed_hash)
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def self._deserialize(type, value)
116
+ case type.to_sym
117
+ when :Time
118
+ Time.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :Boolean
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ # model
149
+ else
150
+ # models (e.g. Pet) or oneOf
151
+ klass = Algolia::Composition.const_get(type)
152
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
153
+ .build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ def to_json(*_args)
170
+ to_hash.to_json
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to?(:to_hash)
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,209 @@
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 Composition
10
+ # An object containing a `multifeed` behavior.
11
+ class CompositionMultifeedBehavior
12
+ attr_accessor :multifeed
13
+
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ :multifeed => :multifeed
18
+ }
19
+ end
20
+
21
+ # Attribute type mapping.
22
+ def self.types_mapping
23
+ {
24
+ :multifeed => :"Multifeed"
25
+ }
26
+ end
27
+
28
+ # List of attributes with nullable: true
29
+ def self.openapi_nullable
30
+ Set.new(
31
+ []
32
+ )
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ raise(
40
+ ArgumentError,
41
+ "The input argument (attributes) must be a hash in `Algolia::CompositionMultifeedBehavior` initialize method"
42
+ )
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ raise(
49
+ ArgumentError,
50
+ "`#{k}` is not a valid attribute in `Algolia::CompositionMultifeedBehavior`. Please check the name to make sure it's valid. List of attributes: " +
51
+ self.class.attribute_map.keys.inspect
52
+ )
53
+ end
54
+
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:multifeed)
59
+ self.multifeed = attributes[:multifeed]
60
+ else
61
+ self.multifeed = nil
62
+ end
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(other)
68
+ return true if self.equal?(other)
69
+ self.class == other.class &&
70
+ multifeed == other.multifeed
71
+ end
72
+
73
+ # @see the `==` method
74
+ # @param [Object] Object to be compared
75
+ def eql?(other)
76
+ self == other
77
+ end
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Integer] Hash code
81
+ def hash
82
+ [multifeed].hash
83
+ end
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def self.build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ attributes = attributes.transform_keys(&:to_sym)
91
+ transformed_hash = {}
92
+ types_mapping.each_pair do |key, type|
93
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
94
+ transformed_hash[key.to_sym] = nil
95
+ elsif type =~ /\AArray<(.*)>/i
96
+ # check to ensure the input is an array given that the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[attribute_map[key]].is_a?(Array)
99
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
100
+ _deserialize(::Regexp.last_match(1), v)
101
+ }
102
+ end
103
+ elsif !attributes[attribute_map[key]].nil?
104
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
105
+ end
106
+ end
107
+
108
+ new(transformed_hash)
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def self._deserialize(type, value)
116
+ case type.to_sym
117
+ when :Time
118
+ Time.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :Boolean
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ # model
149
+ else
150
+ # models (e.g. Pet) or oneOf
151
+ klass = Algolia::Composition.const_get(type)
152
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
153
+ .build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ def to_json(*_args)
170
+ to_hash.to_json
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to?(:to_hash)
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end
@@ -94,8 +94,6 @@ module Algolia
94
94
  if (value = attributes[:conditions]).is_a?(Array)
95
95
  self.conditions = value
96
96
  end
97
- else
98
- self.conditions = nil
99
97
  end
100
98
 
101
99
  if attributes.key?(:consequence)
@@ -0,0 +1,223 @@
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 Composition
10
+ class Multifeed
11
+ # A key-value store of Feed ID to Feed. Currently, the only supported Feed type is an Injection.
12
+ attr_accessor :feeds
13
+
14
+ # A list of Feed IDs that specifies the order in which to order the results in the response. The IDs should be a subset of those in the Feeds object, and only those specified will be processed. When this field is not set, all Feeds are processed and returned with a default ordering.
15
+ attr_accessor :feeds_order
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :feeds => :feeds,
21
+ :feeds_order => :feedsOrder
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.types_mapping
27
+ {
28
+ :feeds => :"Hash<String, Injection>",
29
+ :feeds_order => :"Array<String>"
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new(
36
+ []
37
+ )
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ if (!attributes.is_a?(Hash))
44
+ raise(
45
+ ArgumentError,
46
+ "The input argument (attributes) must be a hash in `Algolia::Multifeed` initialize method"
47
+ )
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ raise(
54
+ ArgumentError,
55
+ "`#{k}` is not a valid attribute in `Algolia::Multifeed`. Please check the name to make sure it's valid. List of attributes: " +
56
+ self.class.attribute_map.keys.inspect
57
+ )
58
+ end
59
+
60
+ h[k.to_sym] = v
61
+ }
62
+
63
+ if attributes.key?(:feeds)
64
+ if (value = attributes[:feeds]).is_a?(Hash)
65
+ self.feeds = value
66
+ end
67
+ else
68
+ self.feeds = nil
69
+ end
70
+
71
+ if attributes.key?(:feeds_order)
72
+ if (value = attributes[:feeds_order]).is_a?(Array)
73
+ self.feeds_order = value
74
+ end
75
+ end
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(other)
81
+ return true if self.equal?(other)
82
+ self.class == other.class &&
83
+ feeds == other.feeds &&
84
+ feeds_order == other.feeds_order
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(other)
90
+ self == other
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [feeds, feeds_order].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ attributes = attributes.transform_keys(&:to_sym)
105
+ transformed_hash = {}
106
+ types_mapping.each_pair do |key, type|
107
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
108
+ transformed_hash[key.to_sym] = nil
109
+ elsif type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the attribute
111
+ # is documented as an array but the input is not
112
+ if attributes[attribute_map[key]].is_a?(Array)
113
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
114
+ _deserialize(::Regexp.last_match(1), v)
115
+ }
116
+ end
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
119
+ end
120
+ end
121
+
122
+ new(transformed_hash)
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def self._deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ # model
163
+ else
164
+ # models (e.g. Pet) or oneOf
165
+ klass = Algolia::Composition.const_get(type)
166
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
167
+ .build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ def to_json(*_args)
184
+ to_hash.to_json
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to?(:to_hash)
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
@@ -7,7 +7,7 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Composition
10
- # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes.
10
+ # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes. - On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).
11
11
  module OptionalFilters
12
12
  class << self
13
13
  # List of class defined in oneOf (OpenAPI v3)
@@ -18,6 +18,9 @@ module Algolia
18
18
  # Client secret. This field is `null` in the API response.
19
19
  attr_accessor :client_secret
20
20
 
21
+ # Authorization code. Used during an `authorization_code` grant type flow, to request an access_token when creating/updating the authentication. This field is not returned in the API response.
22
+ attr_accessor :code
23
+
21
24
  # OAuth scope.
22
25
  attr_accessor :scope
23
26
 
@@ -27,6 +30,7 @@ module Algolia
27
30
  :url => :url,
28
31
  :client_id => :client_id,
29
32
  :client_secret => :client_secret,
33
+ :code => :code,
30
34
  :scope => :scope
31
35
  }
32
36
  end
@@ -36,7 +40,8 @@ module Algolia
36
40
  [
37
41
  :url,
38
42
  :client_id,
39
- :client_secret
43
+ :client_secret,
44
+ :code
40
45
  ]
41
46
  end
42
47
 
@@ -46,6 +51,7 @@ module Algolia
46
51
  :url => :"String",
47
52
  :client_id => :"String",
48
53
  :client_secret => :"String",
54
+ :code => :"String",
49
55
  :scope => :"String"
50
56
  }
51
57
  end
@@ -88,14 +94,14 @@ module Algolia
88
94
 
89
95
  if attributes.key?(:client_id)
90
96
  self.client_id = attributes[:client_id]
91
- else
92
- self.client_id = nil
93
97
  end
94
98
 
95
99
  if attributes.key?(:client_secret)
96
100
  self.client_secret = attributes[:client_secret]
97
- else
98
- self.client_secret = nil
101
+ end
102
+
103
+ if attributes.key?(:code)
104
+ self.code = attributes[:code]
99
105
  end
100
106
 
101
107
  if attributes.key?(:scope)
@@ -111,6 +117,7 @@ module Algolia
111
117
  url == other.url &&
112
118
  client_id == other.client_id &&
113
119
  client_secret == other.client_secret &&
120
+ code == other.code &&
114
121
  scope == other.scope
115
122
  end
116
123
 
@@ -123,7 +130,7 @@ module Algolia
123
130
  # Calculates hash code according to all attributes.
124
131
  # @return [Integer] Hash code
125
132
  def hash
126
- [url, client_id, client_secret, scope].hash
133
+ [url, client_id, client_secret, code, scope].hash
127
134
  end
128
135
 
129
136
  # Builds the object from hash
@@ -18,6 +18,9 @@ module Algolia
18
18
  # Client secret. This field is `null` in the API response.
19
19
  attr_accessor :client_secret
20
20
 
21
+ # Authorization code. Used during an `authorization_code` grant type flow, to request an access_token when creating/updating the authentication. This field is not returned in the API response.
22
+ attr_accessor :code
23
+
21
24
  # OAuth scope.
22
25
  attr_accessor :scope
23
26
 
@@ -27,6 +30,7 @@ module Algolia
27
30
  :url => :url,
28
31
  :client_id => :client_id,
29
32
  :client_secret => :client_secret,
33
+ :code => :code,
30
34
  :scope => :scope
31
35
  }
32
36
  end
@@ -44,6 +48,7 @@ module Algolia
44
48
  :url => :"String",
45
49
  :client_id => :"String",
46
50
  :client_secret => :"String",
51
+ :code => :"String",
47
52
  :scope => :"String"
48
53
  }
49
54
  end
@@ -90,6 +95,10 @@ module Algolia
90
95
  self.client_secret = attributes[:client_secret]
91
96
  end
92
97
 
98
+ if attributes.key?(:code)
99
+ self.code = attributes[:code]
100
+ end
101
+
93
102
  if attributes.key?(:scope)
94
103
  self.scope = attributes[:scope]
95
104
  end
@@ -103,6 +112,7 @@ module Algolia
103
112
  url == other.url &&
104
113
  client_id == other.client_id &&
105
114
  client_secret == other.client_secret &&
115
+ code == other.code &&
106
116
  scope == other.scope
107
117
  end
108
118
 
@@ -115,7 +125,7 @@ module Algolia
115
125
  # Calculates hash code according to all attributes.
116
126
  # @return [Integer] Hash code
117
127
  def hash
118
- [url, client_id, client_secret, scope].hash
128
+ [url, client_id, client_secret, code, scope].hash
119
129
  end
120
130
 
121
131
  # Builds the object from hash
@@ -9,8 +9,6 @@ module Algolia
9
9
  module Ingestion
10
10
  # Request body for updating an authentication resource.
11
11
  class AuthenticationUpdate
12
- attr_accessor :type
13
-
14
12
  # Descriptive name for the resource.
15
13
  attr_accessor :name
16
14
 
@@ -19,7 +17,6 @@ module Algolia
19
17
  # Attribute mapping from ruby-style variable name to JSON key.
20
18
  def self.attribute_map
21
19
  {
22
- :type => :type,
23
20
  :name => :name,
24
21
  :input => :input
25
22
  }
@@ -28,7 +25,6 @@ module Algolia
28
25
  # Attribute type mapping.
29
26
  def self.types_mapping
30
27
  {
31
- :type => :"AuthenticationType",
32
28
  :name => :"String",
33
29
  :input => :"AuthInputPartial"
34
30
  }
@@ -64,10 +60,6 @@ module Algolia
64
60
  h[k.to_sym] = v
65
61
  }
66
62
 
67
- if attributes.key?(:type)
68
- self.type = attributes[:type]
69
- end
70
-
71
63
  if attributes.key?(:name)
72
64
  self.name = attributes[:name]
73
65
  end
@@ -82,7 +74,6 @@ module Algolia
82
74
  def ==(other)
83
75
  return true if self.equal?(other)
84
76
  self.class == other.class &&
85
- type == other.type &&
86
77
  name == other.name &&
87
78
  input == other.input
88
79
  end
@@ -96,7 +87,7 @@ module Algolia
96
87
  # Calculates hash code according to all attributes.
97
88
  # @return [Integer] Hash code
98
89
  def hash
99
- [type, name, input].hash
90
+ [name, input].hash
100
91
  end
101
92
 
102
93
  # Builds the object from hash
@@ -7,7 +7,7 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Insights
10
- # Click event after an Algolia request. Use this event to track when users click items in the search results. If you're building your category pages with Algolia, you'll also use this event.
10
+ # Click event after an Algolia request. Use this event to track when users click items in the search results. If you're building your category pages with Algolia, you'll also use this event.
11
11
  class ClickedObjectIDsAfterSearch
12
12
  # Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
13
13
  attr_accessor :event_name
@@ -7,7 +7,7 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Recommend
10
- # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes.
10
+ # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes. - On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).
11
11
  module OptionalFilters
12
12
  class << self
13
13
  # List of class defined in oneOf (OpenAPI v3)
@@ -17,25 +17,19 @@ module Algolia
17
17
  # Maximum number of recommendations to retrieve. By default, all recommendations are returned and no fallback request is made. Depending on the available recommendations and the other request parameters, the actual number of recommendations may be lower than this value.
18
18
  attr_accessor :max_recommendations
19
19
 
20
- attr_accessor :query_parameters
21
-
22
20
  # Facet attribute for which to retrieve trending facet values.
23
21
  attr_accessor :facet_name
24
22
 
25
23
  attr_accessor :model
26
24
 
27
- attr_accessor :fallback_parameters
28
-
29
25
  # Attribute mapping from ruby-style variable name to JSON key.
30
26
  def self.attribute_map
31
27
  {
32
28
  :index_name => :indexName,
33
29
  :threshold => :threshold,
34
30
  :max_recommendations => :maxRecommendations,
35
- :query_parameters => :queryParameters,
36
31
  :facet_name => :facetName,
37
- :model => :model,
38
- :fallback_parameters => :fallbackParameters
32
+ :model => :model
39
33
  }
40
34
  end
41
35
 
@@ -45,10 +39,8 @@ module Algolia
45
39
  :index_name => :"String",
46
40
  :threshold => :"Float",
47
41
  :max_recommendations => :"Integer",
48
- :query_parameters => :"RecommendSearchParams",
49
42
  :facet_name => :"String",
50
- :model => :"TrendingFacetsModel",
51
- :fallback_parameters => :"FallbackParams"
43
+ :model => :"TrendingFacetsModel"
52
44
  }
53
45
  end
54
46
 
@@ -62,7 +54,6 @@ module Algolia
62
54
  # List of class defined in allOf (OpenAPI v3)
63
55
  def self.openapi_all_of
64
56
  [
65
- :"BaseRecommendRequest",
66
57
  :"TrendingFacets"
67
58
  ]
68
59
  end
@@ -106,10 +97,6 @@ module Algolia
106
97
  self.max_recommendations = attributes[:max_recommendations]
107
98
  end
108
99
 
109
- if attributes.key?(:query_parameters)
110
- self.query_parameters = attributes[:query_parameters]
111
- end
112
-
113
100
  if attributes.key?(:facet_name)
114
101
  self.facet_name = attributes[:facet_name]
115
102
  else
@@ -121,10 +108,6 @@ module Algolia
121
108
  else
122
109
  self.model = nil
123
110
  end
124
-
125
- if attributes.key?(:fallback_parameters)
126
- self.fallback_parameters = attributes[:fallback_parameters]
127
- end
128
111
  end
129
112
 
130
113
  # Checks equality by comparing each attribute.
@@ -135,10 +118,8 @@ module Algolia
135
118
  index_name == other.index_name &&
136
119
  threshold == other.threshold &&
137
120
  max_recommendations == other.max_recommendations &&
138
- query_parameters == other.query_parameters &&
139
121
  facet_name == other.facet_name &&
140
- model == other.model &&
141
- fallback_parameters == other.fallback_parameters
122
+ model == other.model
142
123
  end
143
124
 
144
125
  # @see the `==` method
@@ -150,7 +131,7 @@ module Algolia
150
131
  # Calculates hash code according to all attributes.
151
132
  # @return [Integer] Hash code
152
133
  def hash
153
- [index_name, threshold, max_recommendations, query_parameters, facet_name, model, fallback_parameters].hash
134
+ [index_name, threshold, max_recommendations, facet_name, model].hash
154
135
  end
155
136
 
156
137
  # Builds the object from hash
@@ -7,7 +7,7 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Search
10
- # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes.
10
+ # Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don't work with numeric attributes. - On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).
11
11
  module OptionalFilters
12
12
  class << self
13
13
  # List of class defined in oneOf (OpenAPI v3)
@@ -3,5 +3,5 @@
3
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
4
 
5
5
  module Algolia
6
- VERSION = "3.34.4"
6
+ VERSION = "3.35.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.34.4
4
+ version: 3.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
@@ -273,6 +273,8 @@ files:
273
273
  - lib/algolia/models/composition/composition.rb
274
274
  - lib/algolia/models/composition/composition_behavior.rb
275
275
  - lib/algolia/models/composition/composition_id_ranking_info.rb
276
+ - lib/algolia/models/composition/composition_injection_behavior.rb
277
+ - lib/algolia/models/composition/composition_multifeed_behavior.rb
276
278
  - lib/algolia/models/composition/composition_rule.rb
277
279
  - lib/algolia/models/composition/composition_rule_consequence.rb
278
280
  - lib/algolia/models/composition/composition_rules_batch_params.rb
@@ -318,6 +320,7 @@ files:
318
320
  - lib/algolia/models/composition/main_injection_query_parameters.rb
319
321
  - lib/algolia/models/composition/match_level.rb
320
322
  - lib/algolia/models/composition/matched_geo_location.rb
323
+ - lib/algolia/models/composition/multifeed.rb
321
324
  - lib/algolia/models/composition/multiple_batch_request.rb
322
325
  - lib/algolia/models/composition/multiple_batch_response.rb
323
326
  - lib/algolia/models/composition/numeric_filters.rb