Class FileUploadRequest
java.lang.Object
ai.vectros.resources.documents.requests.FileUploadRequest
-
Method Details
-
getUpsert
- Returns:
- When
trueand a document with the sameexternalIdalready exists, apply the submittedpayload/titleto that existing document (a metadata upsert) before re-issuing the presigned URL. The file body is replaced inherently by the re-upload; it cannot be diffed at upload-init. Defaults tofalse. Requires thedocuments:uscope in addition todocuments:c.
-
getFileName
- Returns:
- Original file name, including its extension. Used as the document title when no separate title is provided.
-
getFileType
- Returns:
- MIME type of the file being uploaded. Used to set the correct Content-Type on the stored object.
-
getIndexMode
- Returns:
- Indexing strategy applied after the file is processed and its text is extracted.
HYBRIDruns both BM25 keyword and dense-vector semantic indexing (recommended).SEMANTICindexes only as dense vectors.TEXTindexes only with BM25.NONEis store-only (archival): the file is still uploaded and its text extracted, but it is not search-indexed — retrievable by id/download and structured-field lookup only. Optional: omit to inherit the bound schema's default index mode. If neither this field nor the schema specifies one, the request is rejected. When both are set, this per-file value wins.
-
getStoreText
- Returns:
- Whether the text extracted from this file is retained after indexing. Defaults to true: the extracted text stays retrievable via
GET /v1/documents/{id}/textand usable byPOST /v1/documents/{id}/ask. Set false to discard the extracted text once indexing completes — search results and the original file download are unaffected, but/textreturns 404 and/askreturns 409 for the document. Fixed at ingest time: it cannot be changed later, and a re-upload to the same document keeps the original choice.
-
getFolderId
- Returns:
- ID of the folder in which to place this document. Omit to use your account's default root folder.
-
getPayload
- Returns:
- The document's structured data, as a flat key/value object. When
schemaIdis set, declared fields are validated against the schema and its lookup fields become directly queryable (matching record and text-ingest behavior); undeclared keys pass through as free-form and are searchable via thefiltersparameter onPOST /v1/search.
-
getSchemaId
- Returns:
- Optional ID of a record schema to bind this document to. When set, the document's
payloadis validated against the schema and its lookup fields become directly queryable (matching record and text-ingest behavior).
-
getUserId
- Returns:
- Owning user ID — the Vectros-assigned UUID of a user in your account. Optional. With an API key, sets the document's owner explicitly. With a scoped token the owning user is attributed by the server from your credential and cannot be set to a different user; supplying one that conflicts is rejected.
-
getScopes
- Returns:
- The document's scope ownership, as
namespace:valueentries (at most 2 namespaces) — for example["org:6ba7b810-9dad-11d1-80b4-00c04fd430c8", "group:eng-team"].organdclientare reserved namespace names, registered like any other; others are namespaces you registered yourself (lowercase, 2-32 chars). Avalueis 1-128 characters: a letter or digit first, then letters, digits,_or-. Resolve a namespace's UUID from your own identifier withGET /v1/entities/{namespace}?externalId=. When supplied, this is the document's COMPLETE scope declaration: each entry must fall inside thedata_scopeof a single clause of your credential that also grants this write — your identity supplies the DEFAULT value when you state none, it does not limit which value you may state. An empty array creates a document owned by the calling user alone (the private tier), and requires a credential whose identity carries a user. Omit the field to inherit the token's full identity — the default. Filter lists by these values with?scope=.
-
getExternalId
- Returns:
- Stable, caller-supplied identifier for this document. Optional. Immutable after create. Unique within your account and context: initiating an upload again with the same
externalIdreturns the same document plus a fresh presigned URL (idempotent — no duplicate), and it is the key other records use to reference this one. Max 256 characters.
-
equals
-
getAdditionalProperties
-
hashCode
public int hashCode() -
toString
-
builder
-