/* Options: Date: 2024-05-03 01:22:30 SwiftVersion: 5.0 Version: 8.12 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://taxfiling.pwc.de //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetDefinitionKeysAsync.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * An asynchronous service to retrieve keys for the identification of VAT properties. */ // @Route("/GetDefinitionKeysAsync", "GET") // @Api(Description="An asynchronous service to retrieve keys for the identification of VAT properties.") public class GetDefinitionKeysAsync : GetDefinitionKeysBase, IReturn { public typealias Return = [DefinitionKey] /** * The year of the assessment (Veranlagungsjahr). */ // @ApiMember(Description="The year of the assessment (Veranlagungsjahr).") public var year:Int /** * The type of VAT return. */ // @ApiMember(Description="The type of VAT return.") public var vatType:VatType required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case year case vatType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) year = try container.decodeIfPresent(Int.self, forKey: .year) vatType = try container.decodeIfPresent(VatType.self, forKey: .vatType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if year != nil { try container.encode(year, forKey: .year) } if vatType != nil { try container.encode(vatType, forKey: .vatType) } } } public enum VatType : String, Codable { case UStVA case UStDV case UStSV case USt case ZM } /** * Create a VAT return from a Return Builder definition. Use the retrieved values as keys for the dictionary of properties that Return Builder provides. */ // @Api(Description="Create a VAT return from a Return Builder definition.\n Use the retrieved values as keys for the dictionary of properties that Return Builder provides.") public class GetDefinitionKeysBase : IGet, Codable { /** * The year of the assessment (Veranlagungsjahr). */ // @ApiMember(Description="The year of the assessment (Veranlagungsjahr).") public var year:Int /** * The type of VAT return. */ // @ApiMember(Description="The type of VAT return.") public var vatType:VatType required public init(){} }