/* Options: Date: 2025-09-05 04:27:41 SwiftVersion: 5.0 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://foundrystage-api-app.azurewebsites.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: CreateApiKeyRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/auth/apikey", "POST") public class CreateApiKeyRequest : PostOperationUnTenanted, IReturn { public typealias Return = CreateApiKeyResponse public var Description:String? public var expiresUtc:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case Description case expiresUtc } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) Description = try container.decodeIfPresent(String.self, forKey: .Description) expiresUtc = try container.decodeIfPresent(Date.self, forKey: .expiresUtc) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if Description != nil { try container.encode(Description, forKey: .Description) } if expiresUtc != nil { try container.encode(expiresUtc, forKey: .expiresUtc) } } } public class CreateApiKeyResponse : Codable { public var responseStatus:ResponseStatus? public var apiKey:ApiKey? required public init(){} } public class PostOperationUnTenanted : IPost, Codable { required public init(){} } public class ApiKey : IIdentifiableResource, Codable { public var userId:String? public var Description:String? public var expiresUtc:Date? public var key:String? public var id:String? required public init(){} } public protocol IIdentifiableResource { var id:String? { get set } }