mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
55 lines
2.0 KiB
Swift
55 lines
2.0 KiB
Swift
//
|
|
// SbomIngest.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SbomIngest: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var document: JSONValue?
|
|
/** Format names the document format; \"cyclonedx\" is the only one parsed. */
|
|
public var format: String?
|
|
/** GitSha is the commit the image was built from. */
|
|
public var gitSha: String?
|
|
/** ImageDigest is the content-addressed digest (sha256:…) the components are keyed under. Required — it, not a tenant, is what an SBOM belongs to. */
|
|
public var imageDigest: String?
|
|
/** ImageRef is the human-readable image reference the digest was published as. A resolve matches on either this or the digest. */
|
|
public var imageRef: String?
|
|
/** SourceRepo is the repository the image was built from. */
|
|
public var sourceRepo: String?
|
|
|
|
public init(document: JSONValue? = nil, format: String? = nil, gitSha: String? = nil, imageDigest: String? = nil, imageRef: String? = nil, sourceRepo: String? = nil) {
|
|
self.document = document
|
|
self.format = format
|
|
self.gitSha = gitSha
|
|
self.imageDigest = imageDigest
|
|
self.imageRef = imageRef
|
|
self.sourceRepo = sourceRepo
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case document
|
|
case format
|
|
case gitSha
|
|
case imageDigest
|
|
case imageRef
|
|
case sourceRepo
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(document, forKey: .document)
|
|
try container.encodeIfPresent(format, forKey: .format)
|
|
try container.encodeIfPresent(gitSha, forKey: .gitSha)
|
|
try container.encodeIfPresent(imageDigest, forKey: .imageDigest)
|
|
try container.encodeIfPresent(imageRef, forKey: .imageRef)
|
|
try container.encodeIfPresent(sourceRepo, forKey: .sourceRepo)
|
|
}
|
|
}
|
|
|