diff --git a/Sources/Ingestion/IngestionClient.swift b/Sources/Ingestion/IngestionClient.swift index 95d5fc45..8f3cde62 100644 --- a/Sources/Ingestion/IngestionClient.swift +++ b/Sources/Ingestion/IngestionClient.swift @@ -3031,11 +3031,11 @@ open class IngestionClient { /// - parameter transformationTry: (body) /// - returns: TransformationTryResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open func tryTransformations( + open func tryTransformation( transformationTry: TransformationTry, requestOptions: RequestOptions? = nil ) async throws -> TransformationTryResponse { - let response: Response = try await tryTransformationsWithHTTPInfo( + let response: Response = try await tryTransformationWithHTTPInfo( transformationTry: transformationTry, requestOptions: requestOptions ) @@ -3056,7 +3056,7 @@ open class IngestionClient { // - parameter transformationTry: (body) // - returns: RequestBuilder - open func tryTransformationsWithHTTPInfo( + open func tryTransformationWithHTTPInfo( transformationTry: TransformationTry, requestOptions userRequestOptions: RequestOptions? = nil ) async throws -> Response { diff --git a/Sources/Ingestion/Models/DockerStreams.swift b/Sources/Ingestion/Models/DockerStreams.swift new file mode 100644 index 00000000..58e75013 --- /dev/null +++ b/Sources/Ingestion/Models/DockerStreams.swift @@ -0,0 +1,52 @@ +// 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 DockerStreams: Codable, JSONEncodable { + /// The name of the stream to fetch the data from (e.g. table name). + public var name: String + /// The properties of the stream to select (e.g. column). + public var properties: [String]? + public var syncMode: DockerStreamsSyncMode + + public init(name: String, properties: [String]? = nil, syncMode: DockerStreamsSyncMode) { + self.name = name + self.properties = properties + self.syncMode = syncMode + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case properties + case syncMode + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.name, forKey: .name) + try container.encodeIfPresent(self.properties, forKey: .properties) + try container.encode(self.syncMode, forKey: .syncMode) + } +} + +extension DockerStreams: Equatable { + public static func ==(lhs: DockerStreams, rhs: DockerStreams) -> Bool { + lhs.name == rhs.name && + lhs.properties == rhs.properties && + lhs.syncMode == rhs.syncMode + } +} + +extension DockerStreams: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(self.name.hashValue) + hasher.combine(self.properties?.hashValue) + hasher.combine(self.syncMode.hashValue) + } +} diff --git a/Sources/Ingestion/Models/DockerStreamsInput.swift b/Sources/Ingestion/Models/DockerStreamsInput.swift index 964cf293..f47a9502 100644 --- a/Sources/Ingestion/Models/DockerStreamsInput.swift +++ b/Sources/Ingestion/Models/DockerStreamsInput.swift @@ -8,9 +8,9 @@ import Foundation /// The selected streams of a singer or airbyte connector. public struct DockerStreamsInput: Codable, JSONEncodable { - public var streams: AnyCodable + public var streams: [DockerStreams] - public init(streams: AnyCodable) { + public init(streams: [DockerStreams]) { self.streams = streams } diff --git a/Sources/Ingestion/Models/DockerStreamsSyncMode.swift b/Sources/Ingestion/Models/DockerStreamsSyncMode.swift new file mode 100644 index 00000000..62585e70 --- /dev/null +++ b/Sources/Ingestion/Models/DockerStreamsSyncMode.swift @@ -0,0 +1,15 @@ +// 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 + +/// The strategy to use to fetch the data. +public enum DockerStreamsSyncMode: String, Codable, CaseIterable { + case incremental + case fullTable +} + +extension DockerStreamsSyncMode: Hashable {}