/* Options: Date: 2026-01-25 07:58:14 SwiftVersion: 6.0 Version: 8.90 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://taxfiling.staging.pwc.de //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetPortalCertificatePublicKey.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * A synchronous service to get the public key of the provided portal certificate. */ // @Route("/GetPortalCertificatePublicKey", "POST") // @Api(Description="A synchronous service to get the public key of the provided portal certificate.") public class GetPortalCertificatePublicKey : GetPortalCertificatePublicKeyBase, IReturn { public typealias Return = GetPublicKeyResponse required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } /** * Represents a type that encapsulates the return values of the ERiC API function that retrieves the public key of a given certificate. */ // @Api(Description="Represents a type that encapsulates the return values of the ERiC API function that retrieves the public key of a given certificate.") public class GetPublicKeyResponse : EricFehlerCodeResponse { /** * The public key of a given certificate. */ // @ApiMember(Description="The public key of a given certificate.") public var rueckgabe:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case rueckgabe } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) rueckgabe = try container.decodeIfPresent(String.self, forKey: .rueckgabe) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if rueckgabe != nil { try container.encode(rueckgabe, forKey: .rueckgabe) } } } /** * Represents a portal certificate that is protected by a password. */ // @Api(Description="Represents a portal certificate that is protected by a password.") public class PortalCertificate : FileBase, ISecuredCertificate { /** * The file name of the certificate. */ // @ApiMember(Description="The file name of the certificate.") // @StringLength(128) public var name:String? /** * The password to protect the certificate from unauthorized access. */ // @StringLength(255) // @ApiMember(Description="The password to protect the certificate from unauthorized access.") public var pin:String? /** * The description of the certificate. */ // @StringLength(Int32.max) // @ApiMember(Description="The description of the certificate.") public var Description:String? /** * Tags that can be used to label or identify the certificate. */ // @ApiMember(Description="Tags that can be used to label or identify the certificate.") public var tags:[String] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case pin case Description case tags } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) pin = try container.decodeIfPresent(String.self, forKey: .pin) Description = try container.decodeIfPresent(String.self, forKey: .Description) tags = try container.decodeIfPresent([String].self, forKey: .tags) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if pin != nil { try container.encode(pin, forKey: .pin) } if Description != nil { try container.encode(Description, forKey: .Description) } if tags.count > 0 { try container.encode(tags, forKey: .tags) } } } /** * A base service to get the public key of a password-protected portal certificate. */ // @Api(Description="A base service to get the public key of a password-protected portal certificate.") public class GetPortalCertificatePublicKeyBase : IPost, Codable { /** * The portal certificate. */ // @ApiMember(Description="The portal certificate.") public var zertifikat:PortalCertificate? required public init(){} } /** * Represents a base class for a file with raw data. */ // @Api(Description="Represents a base class for a file with raw data.") public class FileBase : Codable { /** * The raw data content of the file in bytes. */ // @ApiMember(Description="The raw data content of the file in bytes.", Name="Content") public var content:[UInt8]? required public init(){} } public protocol ISecuredCertificate { var pin:String? { get set } } /** * Represent a base response that encapsulate any ERiC API function return value. */ // @Api(Description="Represent a base response that encapsulate any ERiC API function return value.") public class EricFehlerCodeResponse : ServiceReponseBase { /** * The status code that the ERiC API function returns. */ // @ApiMember(Description="The status code that the ERiC API function returns.") public var statusCode:EricFehlerCode? /** * The status message that the ERiC API function returns. */ // @ApiMember(Description="The status message that the ERiC API function returns.") public var statusText:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case statusCode case statusText } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) statusCode = try container.decodeIfPresent(EricFehlerCode.self, forKey: .statusCode) statusText = try container.decodeIfPresent(String.self, forKey: .statusText) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if statusCode != nil { try container.encode(statusCode, forKey: .statusCode) } if statusText != nil { try container.encode(statusText, forKey: .statusText) } } }