Files

41 lines
1.3 KiB
Swift

//
// VersionView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct VersionView: Sendable, Codable, ParameterConvertible, Hashable {
/** CreatedAt is when this revision was appended, RFC 3339 UTC. */
public var createdAt: String?
/** Type is the kind this revision was written with, which may differ from the current one. */
public var type: String?
/** Version is this revision's number, 1 for the first. Numbers are dense and never reused: deleting the prompt drops the whole history with it. */
public var version: Int64?
public init(createdAt: String? = nil, type: String? = nil, version: Int64? = nil) {
self.createdAt = createdAt
self.type = type
self.version = version
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case createdAt
case type
case version
}
// 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(type, forKey: .type)
try container.encodeIfPresent(version, forKey: .version)
}
}