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.
64 lines
2.3 KiB
Swift
64 lines
2.3 KiB
Swift
//
|
|
// Category.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Category: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Brands are the brands whose console shows this category. Absent means every brand. */
|
|
public var brands: [String]?
|
|
/** ID is the stable slug this category is addressed by, e.g. \"observe\". */
|
|
public var id: String?
|
|
/** Label is the display name, e.g. \"Observe\". */
|
|
public var label: String?
|
|
/** Order is where the category sits among its siblings, ascending. */
|
|
public var order: Int64?
|
|
/** Owner is the org this category belongs to: the platform's own org for a category every tenant sees, or your org for one you added. It tells a console which rows it may offer to edit. */
|
|
public var owner: String?
|
|
/** Summary is the one line describing what the category groups, shown as the header copy on its landing page. */
|
|
public var summary: String?
|
|
/** Taxa are the products filed under this category, in display order. */
|
|
public var taxa: [Taxon]?
|
|
|
|
public init(brands: [String]? = nil, id: String? = nil, label: String? = nil, order: Int64? = nil, owner: String? = nil, summary: String? = nil, taxa: [Taxon]? = nil) {
|
|
self.brands = brands
|
|
self.id = id
|
|
self.label = label
|
|
self.order = order
|
|
self.owner = owner
|
|
self.summary = summary
|
|
self.taxa = taxa
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case brands
|
|
case id
|
|
case label
|
|
case order
|
|
case owner
|
|
case summary
|
|
case taxa
|
|
}
|
|
|
|
// 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(id, forKey: .id)
|
|
try container.encodeIfPresent(label, forKey: .label)
|
|
try container.encodeIfPresent(order, forKey: .order)
|
|
try container.encodeIfPresent(owner, forKey: .owner)
|
|
try container.encodeIfPresent(summary, forKey: .summary)
|
|
try container.encodeIfPresent(taxa, forKey: .taxa)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Category: Identifiable {}
|