mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
74 lines
2.5 KiB
Swift
74 lines
2.5 KiB
Swift
//
|
|
// ScanView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ScanView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CreatedAt is when the scan ran, in Unix milliseconds. */
|
|
public var createdAt: Int64?
|
|
/** Critical is how many findings carry the highest severity. */
|
|
public var critical: Int64?
|
|
/** Files is how many files the scan read. */
|
|
public var files: Int64?
|
|
/** Findings is how many secrets fired across them. */
|
|
public var findings: Int64?
|
|
/** High is how many findings rank high. */
|
|
public var high: Int64?
|
|
/** ID addresses this scan and every finding on it. */
|
|
public var id: String?
|
|
/** Low is how many findings rank low. */
|
|
public var low: Int64?
|
|
/** Medium is how many findings rank medium. */
|
|
public var medium: Int64?
|
|
/** Project is the sub-scope the scan was filed under. */
|
|
public var project: String?
|
|
|
|
public init(createdAt: Int64? = nil, critical: Int64? = nil, files: Int64? = nil, findings: Int64? = nil, high: Int64? = nil, id: String? = nil, low: Int64? = nil, medium: Int64? = nil, project: String? = nil) {
|
|
self.createdAt = createdAt
|
|
self.critical = critical
|
|
self.files = files
|
|
self.findings = findings
|
|
self.high = high
|
|
self.id = id
|
|
self.low = low
|
|
self.medium = medium
|
|
self.project = project
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case createdAt
|
|
case critical
|
|
case files
|
|
case findings
|
|
case high
|
|
case id
|
|
case low
|
|
case medium
|
|
case project
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(critical, forKey: .critical)
|
|
try container.encodeIfPresent(files, forKey: .files)
|
|
try container.encodeIfPresent(findings, forKey: .findings)
|
|
try container.encodeIfPresent(high, forKey: .high)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(low, forKey: .low)
|
|
try container.encodeIfPresent(medium, forKey: .medium)
|
|
try container.encodeIfPresent(project, forKey: .project)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension ScanView: Identifiable {}
|