Skip to content

Commit

Permalink
fix(specs): ingestion docker task input (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3488

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Aug 7, 2024
1 parent da0bb17 commit 036dcf4
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Sources/Ingestion/IngestionClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<TransformationTryResponse> = try await tryTransformationsWithHTTPInfo(
let response: Response<TransformationTryResponse> = try await tryTransformationWithHTTPInfo(
transformationTry: transformationTry,
requestOptions: requestOptions
)
Expand All @@ -3056,7 +3056,7 @@ open class IngestionClient {
// - parameter transformationTry: (body)
// - returns: RequestBuilder<TransformationTryResponse>

open func tryTransformationsWithHTTPInfo(
open func tryTransformationWithHTTPInfo(
transformationTry: TransformationTry,
requestOptions userRequestOptions: RequestOptions? = nil
) async throws -> Response<TransformationTryResponse> {
Expand Down
52 changes: 52 additions & 0 deletions Sources/Ingestion/Models/DockerStreams.swift
Original file line number Diff line number Diff line change
@@ -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)
}
}
4 changes: 2 additions & 2 deletions Sources/Ingestion/Models/DockerStreamsInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
15 changes: 15 additions & 0 deletions Sources/Ingestion/Models/DockerStreamsSyncMode.swift
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit 036dcf4

Please sign in to comment.