Class DocumentResponse

java.lang.Object
ai.vectros.types.DocumentResponse

public final class DocumentResponse extends Object
  • Method Details

    • getId

      public Optional<String> getId()
      Returns:
      The Vectros-assigned unique ID of the document.
    • getTitle

      public Optional<String> getTitle()
      Returns:
      The document's title.
    • getExternalId

      public Optional<String> getExternalId()
      Returns:
      Your own stable identifier for this document (immutable, and unique within your context). Null if the document was created without one.
    • getStatus

      public Optional<DocumentResponseStatus> getStatus()
      Returns:
      Processing status of the document. PENDING_UPLOAD, UPLOADED, EXTRACTING, and PENDING_INDEX are in-flight states; INDEXED means the document is indexed and searchable; SKIPPED means extraction produced no indexable text so there was nothing to index — the document is stored and retrievable, just not searchable (not an error); STORED means it is store-only (indexMode=NONE) — persisted and retrievable but by design not searchable; FAILED means processing failed.
    • getIndexMode

      public Optional<DocumentResponseIndexMode> getIndexMode()
      Returns:
      How this document is indexed. HYBRID, SEMANTIC, and TEXT are searchable; NONE is store-only (not indexed for search).
    • getStoreText

      public Optional<Boolean> getStoreText()
      Returns:
      Whether the raw text is stored and retrievable via GET /v1/documents/{id}/text.
    • getFolderId

      public Optional<String> getFolderId()
      Returns:
      The ID of the folder that contains this document.
    • getPayload

      public Optional<Map<String,Object>> getPayload()
      Returns:
      The document's structured payload, as a JSON object. When schemaId is set, schema-declared fields are validated and indexed for lookup; undeclared keys pass through as free-form. A by-id GET returns the full payload; on list responses this may be only the inline subset of fields (see payloadExternalized).
    • getPayloadExternalized

      public Optional<Boolean> getPayloadExternalized()
      Returns:
      True when this document's structured payload is large enough to be stored externally rather than inline. In that case payload on a list response holds only the inline subset of fields; fetch the full payload with a by-id GET.
    • getSchemaId

      public Optional<String> getSchemaId()
      Returns:
      The ID of the record schema this document's payload is validated and indexed against. Null if the document is schemaless.
    • getSchemaVersion

      public Optional<Integer> getSchemaVersion()
      Returns:
      The version of the bound schema in effect when this document was written. A document keeps the version it was stamped with at write time, even after the schema is later edited. Null when the document is schemaless.
    • getTextBytes

      public Optional<Long> getTextBytes()
      Returns:
      Size of the extracted text, in bytes.
    • getUserId

      public Optional<String> getUserId()
      Returns:
      The owning user — the Vectros-assigned UUID of a user in your account.
    • getOrgId

      public Optional<String> getOrgId()
      Returns:
      The owning organization — the Vectros-assigned UUID of an organization in your account.
    • getClientId

      public Optional<String> getClientId()
      Returns:
      The associated client — the Vectros-assigned UUID of a client in your account.
    • getFileType

      public Optional<String> getFileType()
      Returns:
      MIME type of the uploaded file. Present only for file-backed documents.
    • getFileSize

      public Optional<Long> getFileSize()
      Returns:
      Size of the uploaded file, in bytes. Present only for file-backed documents.
    • getCreatedAt

      public Optional<String> getCreatedAt()
      Returns:
      When the document was created, as an ISO-8601 UTC timestamp.
    • getLastModified

      public Optional<String> getLastModified()
      Returns:
      When the document was last modified, as an ISO-8601 UTC timestamp.
    • getVersion

      public Optional<Long> getVersion()
      Returns:
      Optimistic-concurrency version. Pass this back as expectedVersion on a later update to avoid silently overwriting a concurrent change — the update is rejected with 409 if the document has moved on. Incremented on every successful write.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static DocumentResponse.Builder builder()