Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

56 lines
2.3 KiB
Swift

//
// SessionUser.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct SessionUser: Sendable, Codable, ParameterConvertible, Hashable {
/** Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups. Absent for an anonymous caller. */
public var groups: [String]?
/** Iss is the token issuer as the SPA expects to see it — the literal \"argocd\", so the UI never triggers an SSO redirect of its own. Absent for an anonymous caller. */
public var iss: String?
/** LoggedIn reports whether this browser holds a session this console accepts. */
public var loggedIn: Bool?
/** LoginURL is where an anonymous caller signs in. Absent once signed in. */
public var loginUrl: String?
/** LogoutURL is where a signed-in caller ends the session. Absent when anonymous. */
public var logoutUrl: String?
/** Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or \"admin\" when the principal carries none. Absent when anonymous. */
public var username: String?
public init(groups: [String]? = nil, iss: String? = nil, loggedIn: Bool? = nil, loginUrl: String? = nil, logoutUrl: String? = nil, username: String? = nil) {
self.groups = groups
self.iss = iss
self.loggedIn = loggedIn
self.loginUrl = loginUrl
self.logoutUrl = logoutUrl
self.username = username
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case groups
case iss
case loggedIn
case loginUrl
case logoutUrl
case username
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(groups, forKey: .groups)
try container.encodeIfPresent(iss, forKey: .iss)
try container.encodeIfPresent(loggedIn, forKey: .loggedIn)
try container.encodeIfPresent(loginUrl, forKey: .loginUrl)
try container.encodeIfPresent(logoutUrl, forKey: .logoutUrl)
try container.encodeIfPresent(username, forKey: .username)
}
}