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.
51 lines
1.5 KiB
Swift
51 lines
1.5 KiB
Swift
//
|
|
// TreeEntryJSON.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TreeEntryJSON: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Mode is the octal git file mode (\"100644\", \"040000\", \"120000\"). */
|
|
public var mode: String?
|
|
/** Name is the entry's own name, no directory part. */
|
|
public var name: String?
|
|
/** Path is the entry's full repo-relative path. */
|
|
public var path: String?
|
|
/** Size is the file's byte length; 0 for a directory. */
|
|
public var size: Int64?
|
|
/** Type is \"tree\" for a directory, \"blob\" for a file. */
|
|
public var type: String?
|
|
|
|
public init(mode: String? = nil, name: String? = nil, path: String? = nil, size: Int64? = nil, type: String? = nil) {
|
|
self.mode = mode
|
|
self.name = name
|
|
self.path = path
|
|
self.size = size
|
|
self.type = type
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case mode
|
|
case name
|
|
case path
|
|
case size
|
|
case type
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(mode, forKey: .mode)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(path, forKey: .path)
|
|
try container.encodeIfPresent(size, forKey: .size)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
}
|
|
}
|
|
|