Skip to content

Commit d70d556

Browse files
algolia-botmillotp
andcommitted
feat(specs): add the owner attributes to ingestion resources (generated)
algolia/api-clients-automation#4616 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent a93dc10 commit d70d556

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

Sources/Ingestion/Models/Authentication.swift

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public struct Authentication: Codable, JSONEncodable {
1414
/// Descriptive name for the resource.
1515
public var name: String
1616
public var platform: Platform?
17+
/// Owner of the resource.
18+
public var owner: String?
1719
public var input: AuthInputPartial
1820
/// Date of creation in RFC 3339 format.
1921
public var createdAt: String
@@ -25,6 +27,7 @@ public struct Authentication: Codable, JSONEncodable {
2527
type: AuthenticationType,
2628
name: String,
2729
platform: Platform? = nil,
30+
owner: String? = nil,
2831
input: AuthInputPartial,
2932
createdAt: String,
3033
updatedAt: String? = nil
@@ -33,6 +36,7 @@ public struct Authentication: Codable, JSONEncodable {
3336
self.type = type
3437
self.name = name
3538
self.platform = platform
39+
self.owner = owner
3640
self.input = input
3741
self.createdAt = createdAt
3842
self.updatedAt = updatedAt
@@ -43,6 +47,7 @@ public struct Authentication: Codable, JSONEncodable {
4347
case type
4448
case name
4549
case platform
50+
case owner
4651
case input
4752
case createdAt
4853
case updatedAt
@@ -56,6 +61,7 @@ public struct Authentication: Codable, JSONEncodable {
5661
try container.encode(self.type, forKey: .type)
5762
try container.encode(self.name, forKey: .name)
5863
try container.encodeIfPresent(self.platform, forKey: .platform)
64+
try container.encodeIfPresent(self.owner, forKey: .owner)
5965
try container.encode(self.input, forKey: .input)
6066
try container.encode(self.createdAt, forKey: .createdAt)
6167
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
@@ -68,6 +74,7 @@ extension Authentication: Equatable {
6874
lhs.type == rhs.type &&
6975
lhs.name == rhs.name &&
7076
lhs.platform == rhs.platform &&
77+
lhs.owner == rhs.owner &&
7178
lhs.input == rhs.input &&
7279
lhs.createdAt == rhs.createdAt &&
7380
lhs.updatedAt == rhs.updatedAt
@@ -80,6 +87,7 @@ extension Authentication: Hashable {
8087
hasher.combine(self.type.hashValue)
8188
hasher.combine(self.name.hashValue)
8289
hasher.combine(self.platform?.hashValue)
90+
hasher.combine(self.owner?.hashValue)
8391
hasher.combine(self.input.hashValue)
8492
hasher.combine(self.createdAt.hashValue)
8593
hasher.combine(self.updatedAt?.hashValue)

Sources/Ingestion/Models/Destination.swift

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public struct Destination: Codable, JSONEncodable {
1313
public var type: DestinationType
1414
/// Descriptive name for the resource.
1515
public var name: String
16+
/// Owner of the resource.
17+
public var owner: String?
1618
public var input: DestinationInput
1719
/// Date of creation in RFC 3339 format.
1820
public var createdAt: String
@@ -26,6 +28,7 @@ public struct Destination: Codable, JSONEncodable {
2628
destinationID: String,
2729
type: DestinationType,
2830
name: String,
31+
owner: String? = nil,
2932
input: DestinationInput,
3033
createdAt: String,
3134
updatedAt: String? = nil,
@@ -35,6 +38,7 @@ public struct Destination: Codable, JSONEncodable {
3538
self.destinationID = destinationID
3639
self.type = type
3740
self.name = name
41+
self.owner = owner
3842
self.input = input
3943
self.createdAt = createdAt
4044
self.updatedAt = updatedAt
@@ -46,6 +50,7 @@ public struct Destination: Codable, JSONEncodable {
4650
case destinationID
4751
case type
4852
case name
53+
case owner
4954
case input
5055
case createdAt
5156
case updatedAt
@@ -60,6 +65,7 @@ public struct Destination: Codable, JSONEncodable {
6065
try container.encode(self.destinationID, forKey: .destinationID)
6166
try container.encode(self.type, forKey: .type)
6267
try container.encode(self.name, forKey: .name)
68+
try container.encodeIfPresent(self.owner, forKey: .owner)
6369
try container.encode(self.input, forKey: .input)
6470
try container.encode(self.createdAt, forKey: .createdAt)
6571
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
@@ -73,6 +79,7 @@ extension Destination: Equatable {
7379
lhs.destinationID == rhs.destinationID &&
7480
lhs.type == rhs.type &&
7581
lhs.name == rhs.name &&
82+
lhs.owner == rhs.owner &&
7683
lhs.input == rhs.input &&
7784
lhs.createdAt == rhs.createdAt &&
7885
lhs.updatedAt == rhs.updatedAt &&
@@ -86,6 +93,7 @@ extension Destination: Hashable {
8693
hasher.combine(self.destinationID.hashValue)
8794
hasher.combine(self.type.hashValue)
8895
hasher.combine(self.name.hashValue)
96+
hasher.combine(self.owner?.hashValue)
8997
hasher.combine(self.input.hashValue)
9098
hasher.combine(self.createdAt.hashValue)
9199
hasher.combine(self.updatedAt?.hashValue)

Sources/Ingestion/Models/IngestionSource.swift

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public struct IngestionSource: Codable, JSONEncodable {
1111
public var sourceID: String
1212
public var type: SourceType
1313
public var name: String
14+
/// Owner of the resource.
15+
public var owner: String?
1416
public var input: SourceInput?
1517
/// Universally unique identifier (UUID) of an authentication resource.
1618
public var authenticationID: String?
@@ -23,6 +25,7 @@ public struct IngestionSource: Codable, JSONEncodable {
2325
sourceID: String,
2426
type: SourceType,
2527
name: String,
28+
owner: String? = nil,
2629
input: SourceInput? = nil,
2730
authenticationID: String? = nil,
2831
createdAt: String,
@@ -31,6 +34,7 @@ public struct IngestionSource: Codable, JSONEncodable {
3134
self.sourceID = sourceID
3235
self.type = type
3336
self.name = name
37+
self.owner = owner
3438
self.input = input
3539
self.authenticationID = authenticationID
3640
self.createdAt = createdAt
@@ -41,6 +45,7 @@ public struct IngestionSource: Codable, JSONEncodable {
4145
case sourceID
4246
case type
4347
case name
48+
case owner
4449
case input
4550
case authenticationID
4651
case createdAt
@@ -54,6 +59,7 @@ public struct IngestionSource: Codable, JSONEncodable {
5459
try container.encode(self.sourceID, forKey: .sourceID)
5560
try container.encode(self.type, forKey: .type)
5661
try container.encode(self.name, forKey: .name)
62+
try container.encodeIfPresent(self.owner, forKey: .owner)
5763
try container.encodeIfPresent(self.input, forKey: .input)
5864
try container.encodeIfPresent(self.authenticationID, forKey: .authenticationID)
5965
try container.encode(self.createdAt, forKey: .createdAt)
@@ -66,6 +72,7 @@ extension IngestionSource: Equatable {
6672
lhs.sourceID == rhs.sourceID &&
6773
lhs.type == rhs.type &&
6874
lhs.name == rhs.name &&
75+
lhs.owner == rhs.owner &&
6976
lhs.input == rhs.input &&
7077
lhs.authenticationID == rhs.authenticationID &&
7178
lhs.createdAt == rhs.createdAt &&
@@ -78,6 +85,7 @@ extension IngestionSource: Hashable {
7885
hasher.combine(self.sourceID.hashValue)
7986
hasher.combine(self.type.hashValue)
8087
hasher.combine(self.name.hashValue)
88+
hasher.combine(self.owner?.hashValue)
8189
hasher.combine(self.input?.hashValue)
8290
hasher.combine(self.authenticationID?.hashValue)
8391
hasher.combine(self.createdAt.hashValue)

Sources/Ingestion/Models/IngestionTask.swift

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public struct IngestionTask: Codable, JSONEncodable {
1919
public var lastRun: String?
2020
/// The next scheduled run of the task in RFC 3339 format.
2121
public var nextRun: String?
22+
/// Owner of the resource.
23+
public var owner: String?
2224
public var input: TaskInput?
2325
/// Whether the task is enabled.
2426
public var enabled: Bool
@@ -42,6 +44,7 @@ public struct IngestionTask: Codable, JSONEncodable {
4244
cron: String? = nil,
4345
lastRun: String? = nil,
4446
nextRun: String? = nil,
47+
owner: String? = nil,
4548
input: TaskInput? = nil,
4649
enabled: Bool,
4750
failureThreshold: Int? = nil,
@@ -59,6 +62,7 @@ public struct IngestionTask: Codable, JSONEncodable {
5962
self.cron = cron
6063
self.lastRun = lastRun
6164
self.nextRun = nextRun
65+
self.owner = owner
6266
self.input = input
6367
self.enabled = enabled
6468
self.failureThreshold = failureThreshold
@@ -78,6 +82,7 @@ public struct IngestionTask: Codable, JSONEncodable {
7882
case cron
7983
case lastRun
8084
case nextRun
85+
case owner
8186
case input
8287
case enabled
8388
case failureThreshold
@@ -100,6 +105,7 @@ public struct IngestionTask: Codable, JSONEncodable {
100105
try container.encodeIfPresent(self.cron, forKey: .cron)
101106
try container.encodeIfPresent(self.lastRun, forKey: .lastRun)
102107
try container.encodeIfPresent(self.nextRun, forKey: .nextRun)
108+
try container.encodeIfPresent(self.owner, forKey: .owner)
103109
try container.encodeIfPresent(self.input, forKey: .input)
104110
try container.encode(self.enabled, forKey: .enabled)
105111
try container.encodeIfPresent(self.failureThreshold, forKey: .failureThreshold)
@@ -121,6 +127,7 @@ extension IngestionTask: Equatable {
121127
lhs.cron == rhs.cron &&
122128
lhs.lastRun == rhs.lastRun &&
123129
lhs.nextRun == rhs.nextRun &&
130+
lhs.owner == rhs.owner &&
124131
lhs.input == rhs.input &&
125132
lhs.enabled == rhs.enabled &&
126133
lhs.failureThreshold == rhs.failureThreshold &&
@@ -142,6 +149,7 @@ extension IngestionTask: Hashable {
142149
hasher.combine(self.cron?.hashValue)
143150
hasher.combine(self.lastRun?.hashValue)
144151
hasher.combine(self.nextRun?.hashValue)
152+
hasher.combine(self.owner?.hashValue)
145153
hasher.combine(self.input?.hashValue)
146154
hasher.combine(self.enabled.hashValue)
147155
hasher.combine(self.failureThreshold?.hashValue)

Sources/Ingestion/Models/Transformation.swift

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public struct Transformation: Codable, JSONEncodable {
1717
public var name: String
1818
/// A descriptive name for your transformation of what it does.
1919
public var description: String?
20+
/// Owner of the resource.
21+
public var owner: String?
2022
/// Date of creation in RFC 3339 format.
2123
public var createdAt: String
2224
/// Date of last update in RFC 3339 format.
@@ -28,6 +30,7 @@ public struct Transformation: Codable, JSONEncodable {
2830
code: String,
2931
name: String,
3032
description: String? = nil,
33+
owner: String? = nil,
3134
createdAt: String,
3235
updatedAt: String? = nil
3336
) {
@@ -36,6 +39,7 @@ public struct Transformation: Codable, JSONEncodable {
3639
self.code = code
3740
self.name = name
3841
self.description = description
42+
self.owner = owner
3943
self.createdAt = createdAt
4044
self.updatedAt = updatedAt
4145
}
@@ -46,6 +50,7 @@ public struct Transformation: Codable, JSONEncodable {
4650
case code
4751
case name
4852
case description
53+
case owner
4954
case createdAt
5055
case updatedAt
5156
}
@@ -59,6 +64,7 @@ public struct Transformation: Codable, JSONEncodable {
5964
try container.encode(self.code, forKey: .code)
6065
try container.encode(self.name, forKey: .name)
6166
try container.encodeIfPresent(self.description, forKey: .description)
67+
try container.encodeIfPresent(self.owner, forKey: .owner)
6268
try container.encode(self.createdAt, forKey: .createdAt)
6369
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
6470
}
@@ -71,6 +77,7 @@ extension Transformation: Equatable {
7177
lhs.code == rhs.code &&
7278
lhs.name == rhs.name &&
7379
lhs.description == rhs.description &&
80+
lhs.owner == rhs.owner &&
7481
lhs.createdAt == rhs.createdAt &&
7582
lhs.updatedAt == rhs.updatedAt
7683
}
@@ -83,6 +90,7 @@ extension Transformation: Hashable {
8390
hasher.combine(self.code.hashValue)
8491
hasher.combine(self.name.hashValue)
8592
hasher.combine(self.description?.hashValue)
93+
hasher.combine(self.owner?.hashValue)
8694
hasher.combine(self.createdAt.hashValue)
8795
hasher.combine(self.updatedAt?.hashValue)
8896
}

0 commit comments

Comments
 (0)