Skip to content

Commit 797c592

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit 337eea93. [skip ci]
algolia/api-clients-automation@337eea9 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 626fca0 commit 797c592

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Recommend/Models/GetRecommendationsResponse.swift

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

99
public struct GetRecommendationsResponse: Codable, JSONEncodable {
10-
public var results: [RecommendationsResults]?
10+
public var results: [RecommendationsResults]
1111

12-
public init(results: [RecommendationsResults]? = nil) {
12+
public init(results: [RecommendationsResults]) {
1313
self.results = results
1414
}
1515

@@ -21,7 +21,7 @@ public struct GetRecommendationsResponse: Codable, JSONEncodable {
2121

2222
public func encode(to encoder: Encoder) throws {
2323
var container = encoder.container(keyedBy: CodingKeys.self)
24-
try container.encodeIfPresent(self.results, forKey: .results)
24+
try container.encode(self.results, forKey: .results)
2525
}
2626
}
2727

@@ -33,6 +33,6 @@ extension GetRecommendationsResponse: Equatable {
3333

3434
extension GetRecommendationsResponse: Hashable {
3535
public func hash(into hasher: inout Hasher) {
36-
hasher.combine(self.results?.hashValue)
36+
hasher.combine(self.results.hashValue)
3737
}
3838
}

0 commit comments

Comments
 (0)