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.7 KiB
Swift
74 lines
2.7 KiB
Swift
//
|
|
// DataroomDocument.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DataroomDocument: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ContentType is the mime type recorded at upload, null when none was sent. */
|
|
public var contentType: String?
|
|
/** CreatedAt is when the document was uploaded, in unix milliseconds. */
|
|
public var createdAt: Int64?
|
|
/** FileKey is the opaque object-storage key the bytes are stored under. It is scoped to the tenant's own key prefix and is not a URL. */
|
|
public var fileKey: String?
|
|
/** FileSize is the stored byte count, null when it was not recorded. */
|
|
public var fileSize: Int64?
|
|
/** ID is the document id. */
|
|
public var id: String?
|
|
/** Name is the document's display name. */
|
|
public var name: String?
|
|
/** NumPages is the page count, null when it was not supplied at upload. */
|
|
public var numPages: Int64?
|
|
/** Type is the document's kind, null when it was not recorded. */
|
|
public var type: String?
|
|
/** UpdatedAt is when the document row last changed, in unix milliseconds. */
|
|
public var updatedAt: Int64?
|
|
|
|
public init(contentType: String? = nil, createdAt: Int64? = nil, fileKey: String? = nil, fileSize: Int64? = nil, id: String? = nil, name: String? = nil, numPages: Int64? = nil, type: String? = nil, updatedAt: Int64? = nil) {
|
|
self.contentType = contentType
|
|
self.createdAt = createdAt
|
|
self.fileKey = fileKey
|
|
self.fileSize = fileSize
|
|
self.id = id
|
|
self.name = name
|
|
self.numPages = numPages
|
|
self.type = type
|
|
self.updatedAt = updatedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case contentType
|
|
case createdAt
|
|
case fileKey
|
|
case fileSize
|
|
case id
|
|
case name
|
|
case numPages
|
|
case type
|
|
case updatedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(contentType, forKey: .contentType)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(fileKey, forKey: .fileKey)
|
|
try container.encodeIfPresent(fileSize, forKey: .fileSize)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(numPages, forKey: .numPages)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension DataroomDocument: Identifiable {}
|