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.8 KiB
Swift
89 lines
3.8 KiB
Swift
//
|
|
// Taxon.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Taxon: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Brands are the brands whose console shows this taxon. Absent means every brand its category admits. */
|
|
public var brands: [String]?
|
|
/** Category is the id of the category this taxon is filed under. */
|
|
public var category: String?
|
|
/** Description is the one line shown beneath the name in the catalogue and nav. */
|
|
public var description: String?
|
|
/** Href is the absolute URL an external product launches, for the taxa that genuinely live at their own domain. Empty for an in-console product. */
|
|
public var href: String?
|
|
/** Icon names the icon the surface renders, e.g. \"Database\". It is a NAME, not an image: which icon set draws it is the rendering surface's business. */
|
|
public var icon: String?
|
|
/** ID is the stable slug this taxon is addressed by, e.g. \"vector\". */
|
|
public var id: String?
|
|
/** Name is the display name, e.g. \"Vector\". */
|
|
public var name: String?
|
|
/** Order is where the taxon sits within its category, ascending. */
|
|
public var order: Int64?
|
|
/** Owner is the org this product belongs to: the platform's own org for one every tenant sees, or your org for one you added. Where two rows share an id, yours is the one served. */
|
|
public var owner: String?
|
|
/** Published is whether the taxon is shown. An unpublished taxon is served only to an editor, so a product can be staged before anyone sees it. */
|
|
public var published: Bool?
|
|
/** Route is the in-console path this taxon opens, e.g. \"/vector\". Set for a product the console renders itself; empty for an external one. */
|
|
public var route: String?
|
|
/** Tags are free-form labels for search and grouping across categories. */
|
|
public var tags: [String]?
|
|
|
|
public init(brands: [String]? = nil, category: String? = nil, description: String? = nil, href: String? = nil, icon: String? = nil, id: String? = nil, name: String? = nil, order: Int64? = nil, owner: String? = nil, published: Bool? = nil, route: String? = nil, tags: [String]? = nil) {
|
|
self.brands = brands
|
|
self.category = category
|
|
self.description = description
|
|
self.href = href
|
|
self.icon = icon
|
|
self.id = id
|
|
self.name = name
|
|
self.order = order
|
|
self.owner = owner
|
|
self.published = published
|
|
self.route = route
|
|
self.tags = tags
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case brands
|
|
case category
|
|
case description
|
|
case href
|
|
case icon
|
|
case id
|
|
case name
|
|
case order
|
|
case owner
|
|
case published
|
|
case route
|
|
case tags
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(brands, forKey: .brands)
|
|
try container.encodeIfPresent(category, forKey: .category)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(href, forKey: .href)
|
|
try container.encodeIfPresent(icon, forKey: .icon)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(order, forKey: .order)
|
|
try container.encodeIfPresent(owner, forKey: .owner)
|
|
try container.encodeIfPresent(published, forKey: .published)
|
|
try container.encodeIfPresent(route, forKey: .route)
|
|
try container.encodeIfPresent(tags, forKey: .tags)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Taxon: Identifiable {}
|