Skip to content

Commit 2c20ade

Browse files
algolia-botstevenMevansshortcuts
committed
feat(specs): abtests stopped at (generated)
algolia/api-clients-automation#5275 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Steven Evans <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent e214519 commit 2c20ade

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Sources/Abtesting/Models/AbtestingABTest.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public struct AbtestingABTest: Codable, JSONEncodable {
2020
public var createdAt: String
2121
/// End date and time of the A/B test, in RFC 3339 format.
2222
public var endAt: String
23+
/// Date and time when the A/B test was stopped, in RFC 3339 format.
24+
public var stoppedAt: String?
2325
/// A/B test name.
2426
public var name: String
2527
public var status: AbtestingStatus
@@ -38,6 +40,7 @@ public struct AbtestingABTest: Codable, JSONEncodable {
3840
updatedAt: String,
3941
createdAt: String,
4042
endAt: String,
43+
stoppedAt: String? = nil,
4144
name: String,
4245
status: AbtestingStatus,
4346
variants: [AbtestingVariant],
@@ -52,6 +55,7 @@ public struct AbtestingABTest: Codable, JSONEncodable {
5255
self.updatedAt = updatedAt
5356
self.createdAt = createdAt
5457
self.endAt = endAt
58+
self.stoppedAt = stoppedAt
5559
self.name = name
5660
self.status = status
5761
self.variants = variants
@@ -68,6 +72,7 @@ public struct AbtestingABTest: Codable, JSONEncodable {
6872
case updatedAt
6973
case createdAt
7074
case endAt
75+
case stoppedAt
7176
case name
7277
case status
7378
case variants
@@ -87,6 +92,7 @@ public struct AbtestingABTest: Codable, JSONEncodable {
8792
try container.encode(self.updatedAt, forKey: .updatedAt)
8893
try container.encode(self.createdAt, forKey: .createdAt)
8994
try container.encode(self.endAt, forKey: .endAt)
95+
try container.encodeIfPresent(self.stoppedAt, forKey: .stoppedAt)
9096
try container.encode(self.name, forKey: .name)
9197
try container.encode(self.status, forKey: .status)
9298
try container.encode(self.variants, forKey: .variants)
@@ -105,6 +111,7 @@ extension AbtestingABTest: Equatable {
105111
lhs.updatedAt == rhs.updatedAt &&
106112
lhs.createdAt == rhs.createdAt &&
107113
lhs.endAt == rhs.endAt &&
114+
lhs.stoppedAt == rhs.stoppedAt &&
108115
lhs.name == rhs.name &&
109116
lhs.status == rhs.status &&
110117
lhs.variants == rhs.variants &&
@@ -123,6 +130,7 @@ extension AbtestingABTest: Hashable {
123130
hasher.combine(self.updatedAt.hashValue)
124131
hasher.combine(self.createdAt.hashValue)
125132
hasher.combine(self.endAt.hashValue)
133+
hasher.combine(self.stoppedAt?.hashValue)
126134
hasher.combine(self.name.hashValue)
127135
hasher.combine(self.status.hashValue)
128136
hasher.combine(self.variants.hashValue)

Sources/AbtestingV3/Models/AbtestingV3ABTest.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public struct AbtestingV3ABTest: Codable, JSONEncodable {
1515
public var createdAt: String
1616
/// End date and time of the A/B test, in RFC 3339 format.
1717
public var endAt: String
18+
/// Date and time when the A/B test was stopped, in RFC 3339 format.
19+
public var stoppedAt: String?
1820
/// A/B test name.
1921
public var name: String
2022
public var status: AbtestingV3Status
@@ -30,6 +32,7 @@ public struct AbtestingV3ABTest: Codable, JSONEncodable {
3032
updatedAt: String,
3133
createdAt: String,
3234
endAt: String,
35+
stoppedAt: String? = nil,
3336
name: String,
3437
status: AbtestingV3Status,
3538
variants: [AbtestingV3Variant],
@@ -40,6 +43,7 @@ public struct AbtestingV3ABTest: Codable, JSONEncodable {
4043
self.updatedAt = updatedAt
4144
self.createdAt = createdAt
4245
self.endAt = endAt
46+
self.stoppedAt = stoppedAt
4347
self.name = name
4448
self.status = status
4549
self.variants = variants
@@ -52,6 +56,7 @@ public struct AbtestingV3ABTest: Codable, JSONEncodable {
5256
case updatedAt
5357
case createdAt
5458
case endAt
59+
case stoppedAt
5560
case name
5661
case status
5762
case variants
@@ -67,6 +72,7 @@ public struct AbtestingV3ABTest: Codable, JSONEncodable {
6772
try container.encode(self.updatedAt, forKey: .updatedAt)
6873
try container.encode(self.createdAt, forKey: .createdAt)
6974
try container.encode(self.endAt, forKey: .endAt)
75+
try container.encodeIfPresent(self.stoppedAt, forKey: .stoppedAt)
7076
try container.encode(self.name, forKey: .name)
7177
try container.encode(self.status, forKey: .status)
7278
try container.encode(self.variants, forKey: .variants)
@@ -81,6 +87,7 @@ extension AbtestingV3ABTest: Equatable {
8187
lhs.updatedAt == rhs.updatedAt &&
8288
lhs.createdAt == rhs.createdAt &&
8389
lhs.endAt == rhs.endAt &&
90+
lhs.stoppedAt == rhs.stoppedAt &&
8491
lhs.name == rhs.name &&
8592
lhs.status == rhs.status &&
8693
lhs.variants == rhs.variants &&
@@ -95,6 +102,7 @@ extension AbtestingV3ABTest: Hashable {
95102
hasher.combine(self.updatedAt.hashValue)
96103
hasher.combine(self.createdAt.hashValue)
97104
hasher.combine(self.endAt.hashValue)
105+
hasher.combine(self.stoppedAt?.hashValue)
98106
hasher.combine(self.name.hashValue)
99107
hasher.combine(self.status.hashValue)
100108
hasher.combine(self.variants.hashValue)

0 commit comments

Comments
 (0)