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.
89 lines
3.5 KiB
Swift
89 lines
3.5 KiB
Swift
//
|
|
// TrustItemView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TrustItemView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Attester is who vouched for it: self or auditor. */
|
|
public var attester: String?
|
|
/** Body is the item's content for the kinds that are text rather than a file. */
|
|
public var body: String?
|
|
/** CreatedAt is when it was published, in unix milliseconds. */
|
|
public var createdAt: Int64?
|
|
/** Document is the data-room document holding its bytes, empty when it has none. */
|
|
public var document: String?
|
|
/** Framework is the standard it speaks to, when it speaks to one. */
|
|
public var framework: String?
|
|
/** ID addresses the item. */
|
|
public var id: String?
|
|
/** Kind is one of report, letter, policy, questionnaire, subprocessor, article or update — the closed set the public centre knows how to draw. */
|
|
public var kind: String?
|
|
/** Name is the label the centre lists it under. */
|
|
public var name: String?
|
|
/** Retired is whether it has been withdrawn. A retired item is absent from the public centre and cannot be granted; it is kept because a grant already made over it is part of the record. */
|
|
public var retired: Bool?
|
|
/** Summary is a line about it. */
|
|
public var summary: String?
|
|
/** Tier is public or gated. Gated is the default and an auditor-signed item can only ever be gated. */
|
|
public var tier: String?
|
|
/** UpdatedAt is when it last changed, in unix milliseconds. */
|
|
public var updatedAt: Int64?
|
|
|
|
public init(attester: String? = nil, body: String? = nil, createdAt: Int64? = nil, document: String? = nil, framework: String? = nil, id: String? = nil, kind: String? = nil, name: String? = nil, retired: Bool? = nil, summary: String? = nil, tier: String? = nil, updatedAt: Int64? = nil) {
|
|
self.attester = attester
|
|
self.body = body
|
|
self.createdAt = createdAt
|
|
self.document = document
|
|
self.framework = framework
|
|
self.id = id
|
|
self.kind = kind
|
|
self.name = name
|
|
self.retired = retired
|
|
self.summary = summary
|
|
self.tier = tier
|
|
self.updatedAt = updatedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case attester
|
|
case body
|
|
case createdAt
|
|
case document
|
|
case framework
|
|
case id
|
|
case kind
|
|
case name
|
|
case retired
|
|
case summary
|
|
case tier
|
|
case updatedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(attester, forKey: .attester)
|
|
try container.encodeIfPresent(body, forKey: .body)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(document, forKey: .document)
|
|
try container.encodeIfPresent(framework, forKey: .framework)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(retired, forKey: .retired)
|
|
try container.encodeIfPresent(summary, forKey: .summary)
|
|
try container.encodeIfPresent(tier, forKey: .tier)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension TrustItemView: Identifiable {}
|