mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
54 lines
1.9 KiB
Swift
54 lines
1.9 KiB
Swift
//
|
|
// EsignPDF.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct EsignPDF: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Filename is the name to save it under, built from the title and marked _signed once it is sealed. */
|
|
public var filename: String?
|
|
/** ID is the document this PDF was rendered from. */
|
|
public var id: String?
|
|
/** PdfBase64 is the PDF itself, base64-encoded. There is one field either way, so Sealed is what tells you which artifact you are holding. */
|
|
public var pdfBase64: String?
|
|
/** Sealed is whether this is the SEALED artifact — the field values rendered onto the page and a real x509 PKCS#7 signature applied — rather than the original upload. */
|
|
public var sealed: Bool?
|
|
/** Status is the document's state at the moment it was read. */
|
|
public var status: String?
|
|
|
|
public init(filename: String? = nil, id: String? = nil, pdfBase64: String? = nil, sealed: Bool? = nil, status: String? = nil) {
|
|
self.filename = filename
|
|
self.id = id
|
|
self.pdfBase64 = pdfBase64
|
|
self.sealed = sealed
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case filename
|
|
case id
|
|
case pdfBase64
|
|
case sealed
|
|
case status
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(filename, forKey: .filename)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(pdfBase64, forKey: .pdfBase64)
|
|
try container.encodeIfPresent(sealed, forKey: .sealed)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension EsignPDF: Identifiable {}
|