/* Options: Date: 2026-01-25 15:50:33 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: GetPortalCertificatePinStatus.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * A synchronous service to get the PIN status of a password-protected portal certificate. */ // @Route("/GetPortalCertificatePinStatus", "POST") // @Api(Description="A synchronous service to get the PIN status of a password-protected portal certificate.") public class GetPortalCertificatePinStatus : GetPortalCertificatePinStatusBase, IReturn { public typealias Return = GetPinStatusResponse 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 obtains the PIN status of a given certificate. */ // @Api(Description="Represents a type that encapsulates the return values of the ERiC API function that obtains the PIN status of a given certificate.") public class GetPinStatusResponse : EricFehlerCodeResponse { /** * The PIN status of the provided certificate. */ // @ApiMember(Description="The PIN status of the provided certificate.", Name="PinStatus") public var pinStatus:EricPinStatus? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case pinStatus } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) pinStatus = try container.decodeIfPresent(EricPinStatus.self, forKey: .pinStatus) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if pinStatus != nil { try container.encode(pinStatus, forKey: .pinStatus) } } } /** * 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) } } } /** * Represents the key type for a password-protected area. */ public enum EricKeyType : String, Codable { case eSIGNATURE_KEY case eENCRYPTION_KEY } /** * A base service to get the PIN status of a password-protected portal certificate. */ // @Api(Description="A base service to get the PIN status of a password-protected portal certificate.") public class GetPortalCertificatePinStatusBase : IPost, Codable { /** * The portal certificate, whose PIN status is determined. */ // @ApiMember(Description="The portal certificate, whose PIN status is determined.") public var zertifikat:PortalCertificate? /** * The option for the selection of the key-pair. */ // @ApiMember(Description="The option for the selection of the key-pair.") public var keyType:EricKeyType? required public init(){} } /** * Represents the PIN status. */ public enum EricPinStatus : String, Codable { case STATUS_PIN_OK case STATUS_PIN_LOCKED case STATUS_PREVIOUS_PIN_ERROR case STATUS_LOCKED_IF_PIN_ERROR } /** * 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) } } }