Skip to content

Commit

Permalink
Add init
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhall committed Dec 12, 2024
1 parent eb6e89a commit 476a960
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ struct ClickAction: Action {
struct Default: Codable {
let elements: [PageElement]?
}

Check failure on line 45 in LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/Actions/Click.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Lines should not have trailing whitespace (trailing_whitespace)
init(id: String, actionType: ActionType, elements: [PageElement]? = nil, dataSource: DataSource? = nil, choices: [Choice]? = nil, `default`: Default? = nil, hasDefault: Bool = false) {
self.id = id
self.actionType = actionType
self.elements = elements
self.dataSource = dataSource
self.choices = choices
self.default = `default`
self.hasDefault = `default` != nil
}

init(from decoder: any Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
Expand Down

0 comments on commit 476a960

Please sign in to comment.