Skip to content

Commit 055c078

Browse files
feat(javascript): add replaceAllObjectsWithTransformation (generated)
algolia/api-clients-automation#5008 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent af51893 commit 055c078

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
import Foundation
5+
#if canImport(Core)
6+
import Core
7+
#endif
8+
9+
public struct ReplaceAllObjectsWithTransformationResponse: Codable, JSONEncodable {
10+
public var copyOperationResponse: UpdatedAtResponse
11+
/// The response of the `push` request(s).
12+
public var watchResponses: [SearchWatchResponse]
13+
public var moveOperationResponse: UpdatedAtResponse
14+
15+
public init(
16+
copyOperationResponse: UpdatedAtResponse,
17+
watchResponses: [SearchWatchResponse],
18+
moveOperationResponse: UpdatedAtResponse
19+
) {
20+
self.copyOperationResponse = copyOperationResponse
21+
self.watchResponses = watchResponses
22+
self.moveOperationResponse = moveOperationResponse
23+
}
24+
25+
public enum CodingKeys: String, CodingKey, CaseIterable {
26+
case copyOperationResponse
27+
case watchResponses
28+
case moveOperationResponse
29+
}
30+
31+
// Encodable protocol methods
32+
33+
public func encode(to encoder: Encoder) throws {
34+
var container = encoder.container(keyedBy: CodingKeys.self)
35+
try container.encode(self.copyOperationResponse, forKey: .copyOperationResponse)
36+
try container.encode(self.watchResponses, forKey: .watchResponses)
37+
try container.encode(self.moveOperationResponse, forKey: .moveOperationResponse)
38+
}
39+
}
40+
41+
extension ReplaceAllObjectsWithTransformationResponse: Equatable {
42+
public static func ==(
43+
lhs: ReplaceAllObjectsWithTransformationResponse,
44+
rhs: ReplaceAllObjectsWithTransformationResponse
45+
) -> Bool {
46+
lhs.copyOperationResponse == rhs.copyOperationResponse &&
47+
lhs.watchResponses == rhs.watchResponses &&
48+
lhs.moveOperationResponse == rhs.moveOperationResponse
49+
}
50+
}
51+
52+
extension ReplaceAllObjectsWithTransformationResponse: Hashable {
53+
public func hash(into hasher: inout Hasher) {
54+
hasher.combine(self.copyOperationResponse.hashValue)
55+
hasher.combine(self.watchResponses.hashValue)
56+
hasher.combine(self.moveOperationResponse.hashValue)
57+
}
58+
}

0 commit comments

Comments
 (0)