-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from ChargePoint/IMA-12625
[IMA-12625] Updates for xcresult v3.39
- Loading branch information
Showing
10 changed files
with
527 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ConsoleLogItem.swift | ||
// XCParseCore | ||
// | ||
// Created by Rishab Sukumar on 8/11/22. | ||
// Copyright © 2022 ChargePoint, Inc. All rights reserved. | ||
|
||
import Foundation | ||
|
||
// xcresult 3.39 and above | ||
open class ConsoleLogItem : Codable { | ||
public let adaptorType: String? | ||
public let kind: String? | ||
public let timestamp: Double | ||
public let content: String | ||
|
||
enum ConsoleLogItemCodingKeys: String, CodingKey { | ||
case adaptorType | ||
case kind | ||
case timestamp | ||
case content | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ConsoleLogItemCodingKeys.self) | ||
adaptorType = try container.decodeXCResultTypeIfPresent(forKey: .adaptorType) | ||
kind = try container.decodeXCResultTypeIfPresent(forKey: .kind) | ||
timestamp = try container.decodeXCResultType(forKey: .timestamp) | ||
content = try container.decodeXCResultType(forKey: .content) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// ConsoleLogSection.swift | ||
// XCParseCore | ||
// | ||
// Created by Rishab Sukumar on 8/11/22. | ||
// Copyright © 2022 ChargePoint, Inc. All rights reserved. | ||
|
||
import Foundation | ||
|
||
// xcresult 3.39 and above | ||
open class ConsoleLogSection : Codable { | ||
public let title: String | ||
public let items: [ConsoleLogItem] | ||
|
||
enum ConsoleLogSectionCodingKeys: String, CodingKey { | ||
case title | ||
case items | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ConsoleLogSectionCodingKeys.self) | ||
title = try container.decodeXCResultType(forKey: .title) | ||
items = try container.decodeXCResultArray(forKey: .items) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters