-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add v2 endpoints for ingestion
algolia/api-clients-automation#3416 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
- Loading branch information
1 parent
9cf23ef
commit 3532b6c
Showing
10 changed files
with
194 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
/// Type of indexing operation. | ||
public enum IngestionAction: String, Codable, CaseIterable { | ||
case addObject | ||
case updateObject | ||
case partialUpdateObject | ||
case partialUpdateObjectNoCreate | ||
case deleteObject | ||
case delete | ||
case clear | ||
} | ||
|
||
extension IngestionAction: Hashable {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// 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. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
public struct IngestionBatchRequest: Codable, JSONEncodable { | ||
public var action: IngestionAction | ||
/// Operation arguments (varies with specified `action`). | ||
public var body: AnyCodable | ||
|
||
public init(action: IngestionAction, body: AnyCodable) { | ||
self.action = action | ||
self.body = body | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case action | ||
case body | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.action, forKey: .action) | ||
try container.encode(self.body, forKey: .body) | ||
} | ||
} | ||
|
||
extension IngestionBatchRequest: Equatable { | ||
public static func ==(lhs: IngestionBatchRequest, rhs: IngestionBatchRequest) -> Bool { | ||
lhs.action == rhs.action && | ||
lhs.body == rhs.body | ||
} | ||
} | ||
|
||
extension IngestionBatchRequest: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.action.hashValue) | ||
hasher.combine(self.body.hashValue) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
/// Batch parameters. | ||
public struct IngestionBatchWriteParams: Codable, JSONEncodable { | ||
public var requests: [IngestionBatchRequest] | ||
|
||
public init(requests: [IngestionBatchRequest]) { | ||
self.requests = requests | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case requests | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.requests, forKey: .requests) | ||
} | ||
} | ||
|
||
extension IngestionBatchWriteParams: Equatable { | ||
public static func ==(lhs: IngestionBatchWriteParams, rhs: IngestionBatchWriteParams) -> Bool { | ||
lhs.requests == rhs.requests | ||
} | ||
} | ||
|
||
extension IngestionBatchWriteParams: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.requests.hashValue) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters