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.
41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
//
|
|
// KmsToken.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct KmsToken: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AccessToken is IAM's own JWT, verbatim. Its `owner` claim scopes it to exactly one org, which is what every secret operation then reads. */
|
|
public var accessToken: String?
|
|
/** ExpiresIn is the token's lifetime in seconds, as IAM reported it. */
|
|
public var expiresIn: Int64?
|
|
/** TokenType is `Bearer`. */
|
|
public var tokenType: String?
|
|
|
|
public init(accessToken: String? = nil, expiresIn: Int64? = nil, tokenType: String? = nil) {
|
|
self.accessToken = accessToken
|
|
self.expiresIn = expiresIn
|
|
self.tokenType = tokenType
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accessToken
|
|
case expiresIn
|
|
case tokenType
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accessToken, forKey: .accessToken)
|
|
try container.encodeIfPresent(expiresIn, forKey: .expiresIn)
|
|
try container.encodeIfPresent(tokenType, forKey: .tokenType)
|
|
}
|
|
}
|
|
|