/* Options: Date: 2024-11-21 11:50:42 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GenerateToken.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/token", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") public class GenerateToken : IReturn, Codable { public typealias Return = TokenResponse /** * The token identifier */ // @ApiMember(Description="The token identifier") public var tokenIdentifier:String /** * The token type */ // @ApiMember(Description="The token type", IsRequired=true) public var type:Int /** * The token expiration datetime */ // @ApiMember(Description="The token expiration datetime", IsRequired=true) public var expirationDate:Date /** * The unique token.If empty a unique token will be generated automatically */ // @ApiMember(Description="The unique token.If empty a unique token will be generated automatically", IsRequired=true) public var uniqueToken:String required public init(){} } public class TokenResponse : Codable { /** * The token indentifier */ // @ApiMember(Description="The token indentifier") public var tokenIdentifier:String public var type:Int /** * The unique token */ // @ApiMember(Description="The unique token", IsRequired=true) public var uniqueToken:String public var expirationDate:Date public var responseStatus:ResponseStatus required public init(){} }