mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
41 lines
1.5 KiB
Swift
41 lines
1.5 KiB
Swift
//
|
|
// UserOptinView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct UserOptinView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CanSet is false when the caller's ledger identity cannot be resolved (no user name on the principal). Writing the preference would fail, so hide the control. */
|
|
public var canSet: Bool?
|
|
/** Handle is the display name on the caller's listed row. Empty when they never chose one; opting in without a handle sets it to their username, so a listed row is never blank. */
|
|
public var handle: String?
|
|
/** Listed is true when the caller's board row is published under Handle to other viewers. False — the default for anyone who never opted in — anonymizes the row; the metric still counts, only the name is withheld. */
|
|
public var listed: Bool?
|
|
|
|
public init(canSet: Bool? = nil, handle: String? = nil, listed: Bool? = nil) {
|
|
self.canSet = canSet
|
|
self.handle = handle
|
|
self.listed = listed
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case canSet
|
|
case handle
|
|
case listed
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(canSet, forKey: .canSet)
|
|
try container.encodeIfPresent(handle, forKey: .handle)
|
|
try container.encodeIfPresent(listed, forKey: .listed)
|
|
}
|
|
}
|
|
|