Skip to content

Commit b2c5dba

Browse files
fix(specs): ingestion destinations and transformations (generated)
algolia/api-clients-automation#3477 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 0ac26a6 commit b2c5dba

File tree

4 files changed

+46
-6
lines changed

4 files changed

+46
-6
lines changed

Sources/Ingestion/IngestionClient.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,16 +2319,22 @@ open class IngestionClient {
23192319
)
23202320
}
23212321

2322+
/// - parameter itemsPerPage: (query) Number of items per page. (optional, default to 10)
2323+
/// - parameter page: (query) Page number of the paginated API response. (optional)
23222324
/// - parameter sort: (query) Property by which to sort the list. (optional)
23232325
/// - parameter order: (query) Sort order of the response, ascending or descending. (optional)
23242326
/// - returns: ListTransformationsResponse
23252327
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
23262328
open func listTransformations(
2329+
itemsPerPage: Int? = nil,
2330+
page: Int? = nil,
23272331
sort: SortKeys? = nil,
23282332
order: OrderKeys? = nil,
23292333
requestOptions: RequestOptions? = nil
23302334
) async throws -> ListTransformationsResponse {
23312335
let response: Response<ListTransformationsResponse> = try await listTransformationsWithHTTPInfo(
2336+
itemsPerPage: itemsPerPage,
2337+
page: page,
23322338
sort: sort,
23332339
order: order,
23342340
requestOptions: requestOptions
@@ -2347,19 +2353,27 @@ open class IngestionClient {
23472353
// - deleteIndex
23482354
// - editSettings
23492355
//
2356+
// - parameter itemsPerPage: (query) Number of items per page. (optional, default to 10)
2357+
//
2358+
// - parameter page: (query) Page number of the paginated API response. (optional)
2359+
//
23502360
// - parameter sort: (query) Property by which to sort the list. (optional)
23512361
//
23522362
// - parameter order: (query) Sort order of the response, ascending or descending. (optional)
23532363
// - returns: RequestBuilder<ListTransformationsResponse>
23542364

23552365
open func listTransformationsWithHTTPInfo(
2366+
itemsPerPage: Int? = nil,
2367+
page: Int? = nil,
23562368
sort: SortKeys? = nil,
23572369
order: OrderKeys? = nil,
23582370
requestOptions userRequestOptions: RequestOptions? = nil
23592371
) async throws -> Response<ListTransformationsResponse> {
23602372
let resourcePath = "/1/transformations"
23612373
let body: AnyCodable? = nil
23622374
let queryParameters: [String: Any?] = [
2375+
"itemsPerPage": itemsPerPage?.encodeToJSON(),
2376+
"page": page?.encodeToJSON(),
23632377
"sort": sort?.encodeToJSON(),
23642378
"order": order?.encodeToJSON(),
23652379
]

Sources/Ingestion/Models/Destination.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public struct Destination: Codable, JSONEncodable {
2020
public var updatedAt: String?
2121
/// Universally unique identifier (UUID) of an authentication resource.
2222
public var authenticationID: String?
23+
public var transformationIDs: [String]?
2324

2425
public init(
2526
destinationID: String,
@@ -28,7 +29,8 @@ public struct Destination: Codable, JSONEncodable {
2829
input: DestinationInput,
2930
createdAt: String,
3031
updatedAt: String? = nil,
31-
authenticationID: String? = nil
32+
authenticationID: String? = nil,
33+
transformationIDs: [String]? = nil
3234
) {
3335
self.destinationID = destinationID
3436
self.type = type
@@ -37,6 +39,7 @@ public struct Destination: Codable, JSONEncodable {
3739
self.createdAt = createdAt
3840
self.updatedAt = updatedAt
3941
self.authenticationID = authenticationID
42+
self.transformationIDs = transformationIDs
4043
}
4144

4245
public enum CodingKeys: String, CodingKey, CaseIterable {
@@ -47,6 +50,7 @@ public struct Destination: Codable, JSONEncodable {
4750
case createdAt
4851
case updatedAt
4952
case authenticationID
53+
case transformationIDs
5054
}
5155

5256
// Encodable protocol methods
@@ -60,6 +64,7 @@ public struct Destination: Codable, JSONEncodable {
6064
try container.encode(self.createdAt, forKey: .createdAt)
6165
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
6266
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
67+
try container.encodeIfPresent(self.transformationIDs, forKey: .transformationIDs)
6368
}
6469
}
6570

@@ -71,7 +76,8 @@ extension Destination: Equatable {
7176
lhs.input == rhs.input &&
7277
lhs.createdAt == rhs.createdAt &&
7378
lhs.updatedAt == rhs.updatedAt &&
74-
lhs.authenticationID == rhs.authenticationID
79+
lhs.authenticationID == rhs.authenticationID &&
80+
lhs.transformationIDs == rhs.transformationIDs
7581
}
7682
}
7783

@@ -84,5 +90,6 @@ extension Destination: Hashable {
8490
hasher.combine(self.createdAt.hashValue)
8591
hasher.combine(self.updatedAt?.hashValue)
8692
hasher.combine(self.authenticationID?.hashValue)
93+
hasher.combine(self.transformationIDs?.hashValue)
8794
}
8895
}

Sources/Ingestion/Models/DestinationCreate.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,28 @@ public struct DestinationCreate: Codable, JSONEncodable {
1414
public var input: DestinationInput
1515
/// Universally unique identifier (UUID) of an authentication resource.
1616
public var authenticationID: String?
17+
public var transformationIDs: [String]?
1718

18-
public init(type: DestinationType, name: String, input: DestinationInput, authenticationID: String? = nil) {
19+
public init(
20+
type: DestinationType,
21+
name: String,
22+
input: DestinationInput,
23+
authenticationID: String? = nil,
24+
transformationIDs: [String]? = nil
25+
) {
1926
self.type = type
2027
self.name = name
2128
self.input = input
2229
self.authenticationID = authenticationID
30+
self.transformationIDs = transformationIDs
2331
}
2432

2533
public enum CodingKeys: String, CodingKey, CaseIterable {
2634
case type
2735
case name
2836
case input
2937
case authenticationID
38+
case transformationIDs
3039
}
3140

3241
// Encodable protocol methods
@@ -37,6 +46,7 @@ public struct DestinationCreate: Codable, JSONEncodable {
3746
try container.encode(self.name, forKey: .name)
3847
try container.encode(self.input, forKey: .input)
3948
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
49+
try container.encodeIfPresent(self.transformationIDs, forKey: .transformationIDs)
4050
}
4151
}
4252

@@ -45,7 +55,8 @@ extension DestinationCreate: Equatable {
4555
lhs.type == rhs.type &&
4656
lhs.name == rhs.name &&
4757
lhs.input == rhs.input &&
48-
lhs.authenticationID == rhs.authenticationID
58+
lhs.authenticationID == rhs.authenticationID &&
59+
lhs.transformationIDs == rhs.transformationIDs
4960
}
5061
}
5162

@@ -55,5 +66,6 @@ extension DestinationCreate: Hashable {
5566
hasher.combine(self.name.hashValue)
5667
hasher.combine(self.input.hashValue)
5768
hasher.combine(self.authenticationID?.hashValue)
69+
hasher.combine(self.transformationIDs?.hashValue)
5870
}
5971
}

Sources/Ingestion/Models/DestinationUpdate.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,28 @@ public struct DestinationUpdate: Codable, JSONEncodable {
1414
public var input: DestinationInput?
1515
/// Universally unique identifier (UUID) of an authentication resource.
1616
public var authenticationID: String?
17+
public var transformationIDs: [String]?
1718

1819
public init(
1920
type: DestinationType? = nil,
2021
name: String? = nil,
2122
input: DestinationInput? = nil,
22-
authenticationID: String? = nil
23+
authenticationID: String? = nil,
24+
transformationIDs: [String]? = nil
2325
) {
2426
self.type = type
2527
self.name = name
2628
self.input = input
2729
self.authenticationID = authenticationID
30+
self.transformationIDs = transformationIDs
2831
}
2932

3033
public enum CodingKeys: String, CodingKey, CaseIterable {
3134
case type
3235
case name
3336
case input
3437
case authenticationID
38+
case transformationIDs
3539
}
3640

3741
// Encodable protocol methods
@@ -42,6 +46,7 @@ public struct DestinationUpdate: Codable, JSONEncodable {
4246
try container.encodeIfPresent(self.name, forKey: .name)
4347
try container.encodeIfPresent(self.input, forKey: .input)
4448
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
49+
try container.encodeIfPresent(self.transformationIDs, forKey: .transformationIDs)
4550
}
4651
}
4752

@@ -50,7 +55,8 @@ extension DestinationUpdate: Equatable {
5055
lhs.type == rhs.type &&
5156
lhs.name == rhs.name &&
5257
lhs.input == rhs.input &&
53-
lhs.authenticationID == rhs.authenticationID
58+
lhs.authenticationID == rhs.authenticationID &&
59+
lhs.transformationIDs == rhs.transformationIDs
5460
}
5561
}
5662

@@ -60,5 +66,6 @@ extension DestinationUpdate: Hashable {
6066
hasher.combine(self.name?.hashValue)
6167
hasher.combine(self.input?.hashValue)
6268
hasher.combine(self.authenticationID?.hashValue)
69+
hasher.combine(self.transformationIDs?.hashValue)
6370
}
6471
}

0 commit comments

Comments
 (0)