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.
50 lines
2.0 KiB
Swift
50 lines
2.0 KiB
Swift
//
|
|
// DefRow.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DefRow: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var definition: JSONValue?
|
|
/** Key is the flag's primary key in the caller's (org, project) store, and the name evaluation looks it up by. On a write it is taken from the URL, never from the body: the stored document's own \"key\" is forced to match. */
|
|
public var key: String?
|
|
/** UpdatedAt is when the definition was last written, RFC 3339 UTC. */
|
|
public var updatedAt: String?
|
|
/** UpdatedBy is the email of the principal who last wrote it. Empty when the write came from an in-process composer (an experiment registering its own assignment flag) rather than from a signed-in person. */
|
|
public var updatedBy: String?
|
|
/** Version is 1 when the key was created and rises by one on every overwrite. It counts writes, not content changes: re-storing an identical document bumps it. */
|
|
public var version: Int64?
|
|
|
|
public init(definition: JSONValue? = nil, key: String? = nil, updatedAt: String? = nil, updatedBy: String? = nil, version: Int64? = nil) {
|
|
self.definition = definition
|
|
self.key = key
|
|
self.updatedAt = updatedAt
|
|
self.updatedBy = updatedBy
|
|
self.version = version
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case definition
|
|
case key
|
|
case updatedAt = "updated_at"
|
|
case updatedBy = "updated_by"
|
|
case version
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(definition, forKey: .definition)
|
|
try container.encodeIfPresent(key, forKey: .key)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
try container.encodeIfPresent(updatedBy, forKey: .updatedBy)
|
|
try container.encodeIfPresent(version, forKey: .version)
|
|
}
|
|
}
|
|
|