Document
public struct Document
extension Document: Equatable
Data model that represents a Document entity
-
(Optional) Array containing the path of every composite document
Declaration
Swift
public let compositeDocuments: [CompositeDocument]?
-
The document’s creation date.
Declaration
Swift
public let creationDate: Date
-
The document’s unique identifier.
Declaration
Swift
public let id: String
-
The document’s file name.
Declaration
Swift
public let name: String
-
The document’s origin.
Declaration
Swift
public let origin: Origin
-
The number of pages.
Declaration
Swift
public let pageCount: Int
-
The document’s pages.
Declaration
Swift
public let pages: [Page]?
-
Links to related resources, such as extractions, document, processed, layout or pages.
Declaration
Swift
public let links: Links
-
(Optional) Array containing the path of every partial document info
Declaration
Swift
public let partialDocuments: [PartialDocumentInfo]?
-
The processing state of the document.
Declaration
Swift
public let progress: Progress
-
The document’s source classification.
Declaration
Swift
public let sourceClassification: SourceClassification
-
The document’s expiration date.
Declaration
Swift
public let expirationDate: Date?
-
The document’s layout, formed by an array of pages
See moreDeclaration
Swift
public struct Layout
-
It’s the easiest way to initialize a
Document
if you are receiving a customized JSON structure from your proxy backend.Note
Custom networking only.
Declaration
Swift
public init(creationDate: Date, id: String, name: String, links: Links, pageCount: Int, sourceClassification: SourceClassification, expirationDate: Date?)
Parameters
creationDate
The document’s creation date.
id
The document’s unique identifier.
name
The document’s file name.
links
Links to related resources, such as extractions, document, processed, layout or pages.
pageCount
The document’s number of pages.
sourceClassification
The document’s source classification. We recommend to use
scanned
orcomposite
.expirationDate
The document’s expiration date.
-
The possible states of documents. The availability of a document’s extractions, layout and preview images are depending on the document’s progress.
See moreDeclaration
Swift
public enum Progress : String, Decodable
-
The origin of an uploaded document.
See moreDeclaration
Swift
public enum Origin : String, Decodable
-
The possible source classifications of a document.
See moreDeclaration
Swift
public enum SourceClassification : String, Decodable
-
A document’s page, consisting of an array of number and its page number
See moreDeclaration
Swift
public struct Page
-
Links to related resources, such as extractions, document, processed or layout.
See moreDeclaration
Swift
public struct Links
-
The document types, used as a hint during the analysis.
See moreDeclaration
Swift
public enum DocType : String, Codable
-
The V2 document’s type. Used when creating documents in multipage mode.
See moreDeclaration
Swift
public enum TypeV2
-
The metadata contains any custom information regarding the upload (used later for reporting), creating HTTP headers with an specific format.
See moreDeclaration
Swift
public struct Metadata
-
Declaration
Swift
public static func == (lhs: Document, rhs: Document) -> Bool