Skip to content

Commit 2e269e0

Browse files
algolia-botmillotp
andcommitted
fix(specs): make the updateAt non-null in ingestion (generated)
algolia/api-clients-automation#4697 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent ba8e8d3 commit 2e269e0

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

Sources/Ingestion/Models/Authentication.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public struct Authentication: Codable, JSONEncodable {
2020
/// Date of creation in RFC 3339 format.
2121
public var createdAt: String
2222
/// Date of last update in RFC 3339 format.
23-
public var updatedAt: String?
23+
public var updatedAt: String
2424

2525
public init(
2626
authenticationID: String,
@@ -30,7 +30,7 @@ public struct Authentication: Codable, JSONEncodable {
3030
owner: String? = nil,
3131
input: AuthInputPartial,
3232
createdAt: String,
33-
updatedAt: String? = nil
33+
updatedAt: String
3434
) {
3535
self.authenticationID = authenticationID
3636
self.type = type
@@ -64,7 +64,7 @@ public struct Authentication: Codable, JSONEncodable {
6464
try container.encodeIfPresent(self.owner, forKey: .owner)
6565
try container.encode(self.input, forKey: .input)
6666
try container.encode(self.createdAt, forKey: .createdAt)
67-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
67+
try container.encode(self.updatedAt, forKey: .updatedAt)
6868
}
6969
}
7070

@@ -90,6 +90,6 @@ extension Authentication: Hashable {
9090
hasher.combine(self.owner?.hashValue)
9191
hasher.combine(self.input.hashValue)
9292
hasher.combine(self.createdAt.hashValue)
93-
hasher.combine(self.updatedAt?.hashValue)
93+
hasher.combine(self.updatedAt.hashValue)
9494
}
9595
}

Sources/Ingestion/Models/Destination.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct Destination: Codable, JSONEncodable {
1919
/// Date of creation in RFC 3339 format.
2020
public var createdAt: String
2121
/// Date of last update in RFC 3339 format.
22-
public var updatedAt: String?
22+
public var updatedAt: String
2323
/// Universally unique identifier (UUID) of an authentication resource.
2424
public var authenticationID: String?
2525
public var transformationIDs: [String]?
@@ -31,7 +31,7 @@ public struct Destination: Codable, JSONEncodable {
3131
owner: String? = nil,
3232
input: DestinationInput,
3333
createdAt: String,
34-
updatedAt: String? = nil,
34+
updatedAt: String,
3535
authenticationID: String? = nil,
3636
transformationIDs: [String]? = nil
3737
) {
@@ -68,7 +68,7 @@ public struct Destination: Codable, JSONEncodable {
6868
try container.encodeIfPresent(self.owner, forKey: .owner)
6969
try container.encode(self.input, forKey: .input)
7070
try container.encode(self.createdAt, forKey: .createdAt)
71-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
71+
try container.encode(self.updatedAt, forKey: .updatedAt)
7272
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
7373
try container.encodeIfPresent(self.transformationIDs, forKey: .transformationIDs)
7474
}
@@ -96,7 +96,7 @@ extension Destination: Hashable {
9696
hasher.combine(self.owner?.hashValue)
9797
hasher.combine(self.input.hashValue)
9898
hasher.combine(self.createdAt.hashValue)
99-
hasher.combine(self.updatedAt?.hashValue)
99+
hasher.combine(self.updatedAt.hashValue)
100100
hasher.combine(self.authenticationID?.hashValue)
101101
hasher.combine(self.transformationIDs?.hashValue)
102102
}

Sources/Ingestion/Models/IngestionSource.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct IngestionSource: Codable, JSONEncodable {
1919
/// Date of creation in RFC 3339 format.
2020
public var createdAt: String
2121
/// Date of last update in RFC 3339 format.
22-
public var updatedAt: String?
22+
public var updatedAt: String
2323

2424
public init(
2525
sourceID: String,
@@ -29,7 +29,7 @@ public struct IngestionSource: Codable, JSONEncodable {
2929
input: SourceInput? = nil,
3030
authenticationID: String? = nil,
3131
createdAt: String,
32-
updatedAt: String? = nil
32+
updatedAt: String
3333
) {
3434
self.sourceID = sourceID
3535
self.type = type
@@ -63,7 +63,7 @@ public struct IngestionSource: Codable, JSONEncodable {
6363
try container.encodeIfPresent(self.input, forKey: .input)
6464
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
6565
try container.encode(self.createdAt, forKey: .createdAt)
66-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
66+
try container.encode(self.updatedAt, forKey: .updatedAt)
6767
}
6868
}
6969

@@ -89,6 +89,6 @@ extension IngestionSource: Hashable {
8989
hasher.combine(self.input?.hashValue)
9090
hasher.combine(self.authenticationID?.hashValue)
9191
hasher.combine(self.createdAt.hashValue)
92-
hasher.combine(self.updatedAt?.hashValue)
92+
hasher.combine(self.updatedAt.hashValue)
9393
}
9494
}

Sources/Ingestion/Models/IngestionTask.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public struct IngestionTask: Codable, JSONEncodable {
3535
/// Date of creation in RFC 3339 format.
3636
public var createdAt: String
3737
/// Date of last update in RFC 3339 format.
38-
public var updatedAt: String?
38+
public var updatedAt: String
3939

4040
public init(
4141
taskID: String,
@@ -54,7 +54,7 @@ public struct IngestionTask: Codable, JSONEncodable {
5454
notifications: Notifications? = nil,
5555
policies: Policies? = nil,
5656
createdAt: String,
57-
updatedAt: String? = nil
57+
updatedAt: String
5858
) {
5959
self.taskID = taskID
6060
self.sourceID = sourceID
@@ -115,7 +115,7 @@ public struct IngestionTask: Codable, JSONEncodable {
115115
try container.encodeIfPresent(self.notifications, forKey: .notifications)
116116
try container.encodeIfPresent(self.policies, forKey: .policies)
117117
try container.encode(self.createdAt, forKey: .createdAt)
118-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
118+
try container.encode(self.updatedAt, forKey: .updatedAt)
119119
}
120120
}
121121

@@ -159,6 +159,6 @@ extension IngestionTask: Hashable {
159159
hasher.combine(self.notifications?.hashValue)
160160
hasher.combine(self.policies?.hashValue)
161161
hasher.combine(self.createdAt.hashValue)
162-
hasher.combine(self.updatedAt?.hashValue)
162+
hasher.combine(self.updatedAt.hashValue)
163163
}
164164
}

Sources/Ingestion/Models/TaskV1.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public struct TaskV1: Codable, JSONEncodable {
2929
/// Date of creation in RFC 3339 format.
3030
public var createdAt: String
3131
/// Date of last update in RFC 3339 format.
32-
public var updatedAt: String?
32+
public var updatedAt: String
3333

3434
public init(
3535
taskID: String,
@@ -44,7 +44,7 @@ public struct TaskV1: Codable, JSONEncodable {
4444
notifications: Notifications? = nil,
4545
policies: Policies? = nil,
4646
createdAt: String,
47-
updatedAt: String? = nil
47+
updatedAt: String
4848
) {
4949
self.taskID = taskID
5050
self.sourceID = sourceID
@@ -93,7 +93,7 @@ public struct TaskV1: Codable, JSONEncodable {
9393
try container.encodeIfPresent(self.notifications, forKey: .notifications)
9494
try container.encodeIfPresent(self.policies, forKey: .policies)
9595
try container.encode(self.createdAt, forKey: .createdAt)
96-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
96+
try container.encode(self.updatedAt, forKey: .updatedAt)
9797
}
9898
}
9999

@@ -129,6 +129,6 @@ extension TaskV1: Hashable {
129129
hasher.combine(self.notifications?.hashValue)
130130
hasher.combine(self.policies?.hashValue)
131131
hasher.combine(self.createdAt.hashValue)
132-
hasher.combine(self.updatedAt?.hashValue)
132+
hasher.combine(self.updatedAt.hashValue)
133133
}
134134
}

Sources/Ingestion/Models/Transformation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct Transformation: Codable, JSONEncodable {
2222
/// Date of creation in RFC 3339 format.
2323
public var createdAt: String
2424
/// Date of last update in RFC 3339 format.
25-
public var updatedAt: String?
25+
public var updatedAt: String
2626

2727
public init(
2828
transformationID: String,
@@ -32,7 +32,7 @@ public struct Transformation: Codable, JSONEncodable {
3232
description: String? = nil,
3333
owner: String? = nil,
3434
createdAt: String,
35-
updatedAt: String? = nil
35+
updatedAt: String
3636
) {
3737
self.transformationID = transformationID
3838
self.authenticationIDs = authenticationIDs
@@ -66,7 +66,7 @@ public struct Transformation: Codable, JSONEncodable {
6666
try container.encodeIfPresent(self.description, forKey: .description)
6767
try container.encodeIfPresent(self.owner, forKey: .owner)
6868
try container.encode(self.createdAt, forKey: .createdAt)
69-
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
69+
try container.encode(self.updatedAt, forKey: .updatedAt)
7070
}
7171
}
7272

@@ -92,6 +92,6 @@ extension Transformation: Hashable {
9292
hasher.combine(self.description?.hashValue)
9393
hasher.combine(self.owner?.hashValue)
9494
hasher.combine(self.createdAt.hashValue)
95-
hasher.combine(self.updatedAt?.hashValue)
95+
hasher.combine(self.updatedAt.hashValue)
9696
}
9797
}

Sources/Ingestion/Models/TransformationTryResponse.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import Foundation
77
#endif
88

99
public struct TransformationTryResponse: Codable, JSONEncodable {
10-
/// The array of records returned by the transformation service.
11-
public var payloads: [AnyCodable]
10+
/// The array of stringified records returned by the transformation service.
11+
public var payloads: [String]
1212
public var error: TransformationError?
1313

14-
public init(payloads: [AnyCodable], error: TransformationError? = nil) {
14+
public init(payloads: [String], error: TransformationError? = nil) {
1515
self.payloads = payloads
1616
self.error = error
1717
}

0 commit comments

Comments
 (0)