@@ -16,6 +16,8 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
1616 /// Distance from a central coordinate provided by `aroundLatLng`.
1717 public var automaticRadius : String ?
1818 public var exhaustive : RecommendExhaustive ?
19+ /// Rules applied to the query.
20+ public var appliedRules : [ AnyCodable ] ?
1921 /// See the `facetsCount` field of the `exhaustive` object in the response.
2022 @available ( * , deprecated, message: " This property is deprecated. " )
2123 public var exhaustiveFacetsCount : Bool ?
@@ -67,6 +69,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
6769 aroundLatLng: String ? = nil ,
6870 automaticRadius: String ? = nil ,
6971 exhaustive: RecommendExhaustive ? = nil ,
72+ appliedRules: [ AnyCodable ] ? = nil ,
7073 exhaustiveFacetsCount: Bool ? = nil ,
7174 exhaustiveNbHits: Bool ? = nil ,
7275 exhaustiveTypo: Bool ? = nil ,
@@ -93,6 +96,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
9396 self . aroundLatLng = aroundLatLng
9497 self . automaticRadius = automaticRadius
9598 self . exhaustive = exhaustive
99+ self . appliedRules = appliedRules
96100 self . exhaustiveFacetsCount = exhaustiveFacetsCount
97101 self . exhaustiveNbHits = exhaustiveNbHits
98102 self . exhaustiveTypo = exhaustiveTypo
@@ -121,6 +125,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
121125 case aroundLatLng
122126 case automaticRadius
123127 case exhaustive
128+ case appliedRules
124129 case exhaustiveFacetsCount
125130 case exhaustiveNbHits
126131 case exhaustiveTypo
@@ -169,6 +174,8 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
169174
170175 self . exhaustive = dictionary [ " exhaustive " ] ? . value as? RecommendExhaustive
171176
177+ self . appliedRules = dictionary [ " appliedRules " ] ? . value as? [ AnyCodable ]
178+
172179 self . exhaustiveFacetsCount = dictionary [ " exhaustiveFacetsCount " ] ? . value as? Bool
173180
174181 self . exhaustiveNbHits = dictionary [ " exhaustiveNbHits " ] ? . value as? Bool
@@ -213,7 +220,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
213220
214221 for (key, value) in dictionary {
215222 switch key {
216- case " abTestID " , " abTestVariantID " , " aroundLatLng " , " automaticRadius " , " exhaustive " ,
223+ case " abTestID " , " abTestVariantID " , " aroundLatLng " , " automaticRadius " , " exhaustive " , " appliedRules " ,
217224 " exhaustiveFacetsCount " , " exhaustiveNbHits " , " exhaustiveTypo " , " facets " , " facetsStats " , " index " ,
218225 " indexUsed " , " message " , " nbSortedHits " , " parsedQuery " , " processingTimeMS " , " processingTimingsMS " ,
219226 " queryAfterRemoval " , " redirect " , " renderingContent " , " serverTimeMS " , " serverUsed " , " userData " ,
@@ -234,6 +241,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
234241 try container. encodeIfPresent ( self . aroundLatLng, forKey: . aroundLatLng)
235242 try container. encodeIfPresent ( self . automaticRadius, forKey: . automaticRadius)
236243 try container. encodeIfPresent ( self . exhaustive, forKey: . exhaustive)
244+ try container. encodeIfPresent ( self . appliedRules, forKey: . appliedRules)
237245 try container. encodeIfPresent ( self . exhaustiveFacetsCount, forKey: . exhaustiveFacetsCount)
238246 try container. encodeIfPresent ( self . exhaustiveNbHits, forKey: . exhaustiveNbHits)
239247 try container. encodeIfPresent ( self . exhaustiveTypo, forKey: . exhaustiveTypo)
@@ -268,6 +276,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
268276 self . aroundLatLng = try container. decodeIfPresent ( String . self, forKey: . aroundLatLng)
269277 self . automaticRadius = try container. decodeIfPresent ( String . self, forKey: . automaticRadius)
270278 self . exhaustive = try container. decodeIfPresent ( RecommendExhaustive . self, forKey: . exhaustive)
279+ self . appliedRules = try container. decodeIfPresent ( [ AnyCodable ] . self, forKey: . appliedRules)
271280 self . exhaustiveFacetsCount = try container. decodeIfPresent ( Bool . self, forKey: . exhaustiveFacetsCount)
272281 self . exhaustiveNbHits = try container. decodeIfPresent ( Bool . self, forKey: . exhaustiveNbHits)
273282 self . exhaustiveTypo = try container. decodeIfPresent ( Bool . self, forKey: . exhaustiveTypo)
@@ -294,6 +303,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
294303 nonAdditionalPropertyKeys. insert ( " aroundLatLng " )
295304 nonAdditionalPropertyKeys. insert ( " automaticRadius " )
296305 nonAdditionalPropertyKeys. insert ( " exhaustive " )
306+ nonAdditionalPropertyKeys. insert ( " appliedRules " )
297307 nonAdditionalPropertyKeys. insert ( " exhaustiveFacetsCount " )
298308 nonAdditionalPropertyKeys. insert ( " exhaustiveNbHits " )
299309 nonAdditionalPropertyKeys. insert ( " exhaustiveTypo " )
@@ -329,6 +339,7 @@ extension RecommendBaseSearchResponse: Equatable {
329339 lhs. aroundLatLng == rhs. aroundLatLng &&
330340 lhs. automaticRadius == rhs. automaticRadius &&
331341 lhs. exhaustive == rhs. exhaustive &&
342+ lhs. appliedRules == rhs. appliedRules &&
332343 lhs. exhaustiveFacetsCount == rhs. exhaustiveFacetsCount &&
333344 lhs. exhaustiveNbHits == rhs. exhaustiveNbHits &&
334345 lhs. exhaustiveTypo == rhs. exhaustiveTypo &&
@@ -360,6 +371,7 @@ extension RecommendBaseSearchResponse: Hashable {
360371 hasher. combine ( self . aroundLatLng? . hashValue)
361372 hasher. combine ( self . automaticRadius? . hashValue)
362373 hasher. combine ( self . exhaustive? . hashValue)
374+ hasher. combine ( self . appliedRules? . hashValue)
363375 hasher. combine ( self . exhaustiveFacetsCount? . hashValue)
364376 hasher. combine ( self . exhaustiveNbHits? . hashValue)
365377 hasher. combine ( self . exhaustiveTypo? . hashValue)
0 commit comments