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.
36 lines
1.4 KiB
Swift
36 lines
1.4 KiB
Swift
//
|
|
// IdentityIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct IdentityIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Name is the device's name within the org — a DNS label. The fabric knows the identity as \"<name>.<org>\"; every answer here uses the caller's name. */
|
|
public var name: String?
|
|
/** Roles are extra role attributes for the identity, each scoped to the caller's org on the way in (\"k3s-host\" is written as \"k3s-host.<org>\") so no caller can claim an attribute another tenant's policy selects. A role of the form \"<service>-host\" makes this identity a HOST of that published service — the bind policy from POST /v1/network/services selects exactly that attribute — and is refused when the org has no such service. */
|
|
public var roles: [String]?
|
|
|
|
public init(name: String? = nil, roles: [String]? = nil) {
|
|
self.name = name
|
|
self.roles = roles
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case name
|
|
case roles
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(roles, forKey: .roles)
|
|
}
|
|
}
|
|
|