@@ -21,7 +21,7 @@ public struct TaskV1: Codable, JSONEncodable {
2121 public var enabled : Bool
2222 /// Maximum accepted percentage of failures for a task run to finish successfully.
2323 public var failureThreshold : Int ?
24- public var action : ActionType
24+ public var action : ActionType ?
2525 /// Date of the last cursor in RFC 3339 format.
2626 public var cursor : String ?
2727 /// Date of creation in RFC 3339 format.
@@ -37,7 +37,7 @@ public struct TaskV1: Codable, JSONEncodable {
3737 input: TaskInput ? = nil ,
3838 enabled: Bool ,
3939 failureThreshold: Int ? = nil ,
40- action: ActionType ,
40+ action: ActionType ? = nil ,
4141 cursor: String ? = nil ,
4242 createdAt: String ,
4343 updatedAt: String ? = nil
@@ -80,7 +80,7 @@ public struct TaskV1: Codable, JSONEncodable {
8080 try container. encodeIfPresent ( self . input, forKey: . input)
8181 try container. encode ( self . enabled, forKey: . enabled)
8282 try container. encodeIfPresent ( self . failureThreshold, forKey: . failureThreshold)
83- try container. encode ( self . action, forKey: . action)
83+ try container. encodeIfPresent ( self . action, forKey: . action)
8484 try container. encodeIfPresent ( self . cursor, forKey: . cursor)
8585 try container. encode ( self . createdAt, forKey: . createdAt)
8686 try container. encodeIfPresent ( self . updatedAt, forKey: . updatedAt)
@@ -112,7 +112,7 @@ extension TaskV1: Hashable {
112112 hasher. combine ( self . input? . hashValue)
113113 hasher. combine ( self . enabled. hashValue)
114114 hasher. combine ( self . failureThreshold? . hashValue)
115- hasher. combine ( self . action. hashValue)
115+ hasher. combine ( self . action? . hashValue)
116116 hasher. combine ( self . cursor? . hashValue)
117117 hasher. combine ( self . createdAt. hashValue)
118118 hasher. combine ( self . updatedAt? . hashValue)
0 commit comments