Skip to content

Commit 1523ed4

Browse files
algolia-botrenovate[bot]shortcuts
committed
chore(deps): dependencies 2025-01-06 [skip-bc] (generated)
algolia/api-clients-automation#4299 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Algolia Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent af3bd60 commit 1523ed4

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

Sources/Personalization/Models/EventScoring.swift renamed to Sources/Personalization/Models/EventsScoring.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
import Core
77
#endif
88

9-
public struct EventScoring: Codable, JSONEncodable {
9+
public struct EventsScoring: Codable, JSONEncodable {
1010
/// Event score.
1111
public var score: Int
1212
/// Event name.
@@ -35,15 +35,15 @@ public struct EventScoring: Codable, JSONEncodable {
3535
}
3636
}
3737

38-
extension EventScoring: Equatable {
39-
public static func ==(lhs: EventScoring, rhs: EventScoring) -> Bool {
38+
extension EventsScoring: Equatable {
39+
public static func ==(lhs: EventsScoring, rhs: EventsScoring) -> Bool {
4040
lhs.score == rhs.score &&
4141
lhs.eventName == rhs.eventName &&
4242
lhs.eventType == rhs.eventType
4343
}
4444
}
4545

46-
extension EventScoring: Hashable {
46+
extension EventsScoring: Hashable {
4747
public func hash(into hasher: inout Hasher) {
4848
hasher.combine(self.score.hashValue)
4949
hasher.combine(self.eventName.hashValue)

Sources/Personalization/Models/FacetScoring.swift renamed to Sources/Personalization/Models/FacetsScoring.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
import Core
77
#endif
88

9-
public struct FacetScoring: Codable, JSONEncodable {
9+
public struct FacetsScoring: Codable, JSONEncodable {
1010
/// Event score.
1111
public var score: Int
1212
/// Facet attribute name.
@@ -31,14 +31,14 @@ public struct FacetScoring: Codable, JSONEncodable {
3131
}
3232
}
3333

34-
extension FacetScoring: Equatable {
35-
public static func ==(lhs: FacetScoring, rhs: FacetScoring) -> Bool {
34+
extension FacetsScoring: Equatable {
35+
public static func ==(lhs: FacetsScoring, rhs: FacetsScoring) -> Bool {
3636
lhs.score == rhs.score &&
3737
lhs.facetName == rhs.facetName
3838
}
3939
}
4040

41-
extension FacetScoring: Hashable {
41+
extension FacetsScoring: Hashable {
4242
public func hash(into hasher: inout Hasher) {
4343
hasher.combine(self.score.hashValue)
4444
hasher.combine(self.facetName.hashValue)

Sources/Personalization/Models/PersonalizationStrategyParams.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,48 @@ import Foundation
99
public struct PersonalizationStrategyParams: Codable, JSONEncodable {
1010
/// Scores associated with each event. The higher the scores, the higher the impact of those events on the
1111
/// personalization of search results.
12-
public var eventScoring: [EventScoring]
12+
public var eventsScoring: [EventsScoring]
1313
/// Scores associated with each facet. The higher the scores, the higher the impact of those events on the
1414
/// personalization of search results.
15-
public var facetScoring: [FacetScoring]
15+
public var facetsScoring: [FacetsScoring]
1616
/// Impact of personalization on the search results. If set to 0, personalization has no impact on the search
1717
/// results.
1818
public var personalizationImpact: Int
1919

20-
public init(eventScoring: [EventScoring], facetScoring: [FacetScoring], personalizationImpact: Int) {
21-
self.eventScoring = eventScoring
22-
self.facetScoring = facetScoring
20+
public init(eventsScoring: [EventsScoring], facetsScoring: [FacetsScoring], personalizationImpact: Int) {
21+
self.eventsScoring = eventsScoring
22+
self.facetsScoring = facetsScoring
2323
self.personalizationImpact = personalizationImpact
2424
}
2525

2626
public enum CodingKeys: String, CodingKey, CaseIterable {
27-
case eventScoring
28-
case facetScoring
27+
case eventsScoring
28+
case facetsScoring
2929
case personalizationImpact
3030
}
3131

3232
// Encodable protocol methods
3333

3434
public func encode(to encoder: Encoder) throws {
3535
var container = encoder.container(keyedBy: CodingKeys.self)
36-
try container.encode(self.eventScoring, forKey: .eventScoring)
37-
try container.encode(self.facetScoring, forKey: .facetScoring)
36+
try container.encode(self.eventsScoring, forKey: .eventsScoring)
37+
try container.encode(self.facetsScoring, forKey: .facetsScoring)
3838
try container.encode(self.personalizationImpact, forKey: .personalizationImpact)
3939
}
4040
}
4141

4242
extension PersonalizationStrategyParams: Equatable {
4343
public static func ==(lhs: PersonalizationStrategyParams, rhs: PersonalizationStrategyParams) -> Bool {
44-
lhs.eventScoring == rhs.eventScoring &&
45-
lhs.facetScoring == rhs.facetScoring &&
44+
lhs.eventsScoring == rhs.eventsScoring &&
45+
lhs.facetsScoring == rhs.facetsScoring &&
4646
lhs.personalizationImpact == rhs.personalizationImpact
4747
}
4848
}
4949

5050
extension PersonalizationStrategyParams: Hashable {
5151
public func hash(into hasher: inout Hasher) {
52-
hasher.combine(self.eventScoring.hashValue)
53-
hasher.combine(self.facetScoring.hashValue)
52+
hasher.combine(self.eventsScoring.hashValue)
53+
hasher.combine(self.facetsScoring.hashValue)
5454
hasher.combine(self.personalizationImpact.hashValue)
5555
}
5656
}

0 commit comments

Comments
 (0)