@@ -21,7 +21,7 @@ public struct TaskV1: Codable, JSONEncodable {
21
21
public var enabled : Bool
22
22
/// Maximum accepted percentage of failures for a task run to finish successfully.
23
23
public var failureThreshold : Int ?
24
- public var action : ActionType
24
+ public var action : ActionType ?
25
25
/// Date of the last cursor in RFC 3339 format.
26
26
public var cursor : String ?
27
27
/// Date of creation in RFC 3339 format.
@@ -37,7 +37,7 @@ public struct TaskV1: Codable, JSONEncodable {
37
37
input: TaskInput ? = nil ,
38
38
enabled: Bool ,
39
39
failureThreshold: Int ? = nil ,
40
- action: ActionType ,
40
+ action: ActionType ? = nil ,
41
41
cursor: String ? = nil ,
42
42
createdAt: String ,
43
43
updatedAt: String ? = nil
@@ -80,7 +80,7 @@ public struct TaskV1: Codable, JSONEncodable {
80
80
try container. encodeIfPresent ( self . input, forKey: . input)
81
81
try container. encode ( self . enabled, forKey: . enabled)
82
82
try container. encodeIfPresent ( self . failureThreshold, forKey: . failureThreshold)
83
- try container. encode ( self . action, forKey: . action)
83
+ try container. encodeIfPresent ( self . action, forKey: . action)
84
84
try container. encodeIfPresent ( self . cursor, forKey: . cursor)
85
85
try container. encode ( self . createdAt, forKey: . createdAt)
86
86
try container. encodeIfPresent ( self . updatedAt, forKey: . updatedAt)
@@ -112,7 +112,7 @@ extension TaskV1: Hashable {
112
112
hasher. combine ( self . input? . hashValue)
113
113
hasher. combine ( self . enabled. hashValue)
114
114
hasher. combine ( self . failureThreshold? . hashValue)
115
- hasher. combine ( self . action. hashValue)
115
+ hasher. combine ( self . action? . hashValue)
116
116
hasher. combine ( self . cursor? . hashValue)
117
117
hasher. combine ( self . createdAt. hashValue)
118
118
hasher. combine ( self . updatedAt? . hashValue)
0 commit comments