Class RecordResponse.Builder

java.lang.Object
ai.vectros.types.RecordResponse.Builder
Enclosing class:
RecordResponse

public static final class RecordResponse.Builder extends Object
  • Method Details

    • from

    • created

      public RecordResponse.Builder created(Optional<Boolean> created)

      Whether this call created a new record. True when a new record was created; false when a record with the same externalId already existed and was returned unchanged (idempotent create) or updated (when ?upsert=true). Present only on the create response (POST /v1/records); absent on reads. The HTTP status mirrors it — 201 when created, 200 when an existing record was returned.

    • created

      public RecordResponse.Builder created(Boolean created)
    • id

      Unique identifier for this record (UUID), assigned by Vectros at creation.

    • id

    • typeName

      public RecordResponse.Builder typeName(Optional<String> typeName)

      The record's type, matching the typeName declared on the schema this record was created against.

    • typeName

      public RecordResponse.Builder typeName(String typeName)
    • schemaId

      public RecordResponse.Builder schemaId(Optional<String> schemaId)

      Identifier of the schema this record was validated against.

    • schemaId

      public RecordResponse.Builder schemaId(String schemaId)
    • schemaVersion

      public RecordResponse.Builder schemaVersion(Optional<Integer> schemaVersion)

      The version of the governing schema at the moment this record was written. The schema version increments on every schema edit, but a record keeps the version it was stamped with at write time even after the schema evolves — so you always know which schema shape the payload conforms to. Null for a record created without a schema.

    • schemaVersion

      public RecordResponse.Builder schemaVersion(Integer schemaVersion)
    • externalId

      public RecordResponse.Builder externalId(Optional<String> externalId)

      Your own stable identifier for this record. Immutable, and unique within your account, context, and record type. Null if the record was created without one.

    • externalId

      public RecordResponse.Builder externalId(String externalId)
    • payload

      public RecordResponse.Builder payload(Optional<Map<String,Object>> payload)

      The record's data payload. Its structure is defined by the referenced schema. Fields the schema marks as searchable are indexed for full-text and semantic search. When a record's payload is stored externally (because it is large), list and lookup responses return only the indexed/metadata projection here and set payloadExternalized to true; to retrieve the full payload, fetch the record by id (GET /v1/records/{id}) or pass includePayload=true on the list or lookup call.

    • payload

      public RecordResponse.Builder payload(Map<String,Object> payload)
    • payloadExternalized

      public RecordResponse.Builder payloadExternalized(Optional<Boolean> payloadExternalized)

      True when this record's full payload is stored externally rather than inline. In that case list and lookup responses return only the indexed projection in payload unless includePayload=true was passed; fetching the record by id always returns the full payload. Null (omitted) for inline records.

    • payloadExternalized

      public RecordResponse.Builder payloadExternalized(Boolean payloadExternalized)
    • payloadBytes

      public RecordResponse.Builder payloadBytes(Optional<Long> payloadBytes)

      Size in bytes of the full externalized payload. Present only when payloadExternalized is true.

    • payloadBytes

      public RecordResponse.Builder payloadBytes(Long payloadBytes)
    • payloadPartial

      public RecordResponse.Builder payloadPartial(Optional<Boolean> payloadPartial)

      True when THIS response returned only a PARTIAL payload — a large record's bulk fields are omitted from payload because you did not request them (a list or lookup without includePayload=true). Unlike payloadExternalized (which is also true on a by-id read that DID return the full payload), this tells you the payload in hand is incomplete. To get the full payload, fetch the record by id (GET /v1/records/{id}) or pass includePayload=true. To UPDATE such a record, use PATCH (which preserves omitted fields) — a PUT built from this response would clear the omitted fields unless you pass ?allowClear=true. Null (omitted) when the payload is complete.

    • payloadPartial

      public RecordResponse.Builder payloadPartial(Boolean payloadPartial)
    • status

      Record lifecycle status. ACTIVE records are live and searchable; ARCHIVED records are retracted from search and recall while kept stored, retrievable by id, findable by structured-field lookup, and listed by GET /v1/records (set status back to ACTIVE to restore).

    • status

    • folderId

      public RecordResponse.Builder folderId(Optional<String> folderId)

      Identifier of the folder grouping this record. A folder can group both records and documents together.

    • folderId

      public RecordResponse.Builder folderId(String folderId)
    • userId

      public RecordResponse.Builder userId(Optional<String> userId)

      Identifier of the owning user (a Vectros-assigned UUID). Set automatically from the calling token's identity when the token carries a user identity.

    • userId

      public RecordResponse.Builder userId(String userId)
    • scopes

      public RecordResponse.Builder scopes(Optional<List<String>> scopes)

      The record's scope ownership as canonical namespace:value entries (at most 2). org and client are reserved namespace names; any other is one you registered yourself. Set at creation, either explicitly or automatically from the calling token's identity. Empty for a record owned by a user alone (or unowned). Filter lists by these values with ?scope=.

    • scopes

      public RecordResponse.Builder scopes(List<String> scopes)
    • indexStatus

      public RecordResponse.Builder indexStatus(Optional<RecordResponseIndexStatus> indexStatus)

      Search-index status. PENDING_INDEX means the record is queued for indexing. INDEXED means indexing is complete and it is searchable via POST /v1/search — but the two search strategies do not become queryable at the same instant. Keyword (TEXT) matching is immediate. The semantic (vector) index is eventually consistent for queries: durably written at INDEXED, but typically queryable a second or two later (longer under heavy indexing load). A freshly indexed record that matches a HYBRID or RAG query's keywords still surfaces immediately — you don't wait for the vector index — but a query that can only match it semantically (a mode: SEMANTIC search, or a HYBRID/RAG query sharing no words with the record) may not return it for those first few seconds. If you search immediately after a write, share words with the record or briefly retry. SKIPPED means the record had no indexable text (e.g. only non-searchable fields populated) so there was nothing to index — it is stored and retrievable, just not full-text/semantic searchable until a searchable field is filled in; not an error. FAILED means indexing hit an error — the record is still readable but not searchable. Null for a store-only record (indexMode NONE), which has no indexing to track.

    • indexStatus

      public RecordResponse.Builder indexStatus(RecordResponseIndexStatus indexStatus)
    • indexFailure

      public RecordResponse.Builder indexFailure(Optional<IndexFailure> indexFailure)
    • indexFailure

      public RecordResponse.Builder indexFailure(IndexFailure indexFailure)
    • indexMode

      The record's resolved search-index mode: the per-record override if set, otherwise the schema's type-level default, otherwise NONE. HYBRID, SEMANTIC, and TEXT make the record searchable; NONE is store-only.

    • indexMode

      public RecordResponse.Builder indexMode(RecordResponseIndexMode indexMode)
    • createdBy

      public RecordResponse.Builder createdBy(Optional<String> createdBy)

      Identifier of the API key or scoped token that created this record (for example, key_abc123 for an API key).

    • createdBy

      public RecordResponse.Builder createdBy(String createdBy)
    • createdAt

      public RecordResponse.Builder createdAt(Optional<String> createdAt)

      When the record was created, as an ISO-8601 UTC timestamp.

    • createdAt

      public RecordResponse.Builder createdAt(String createdAt)
    • updatedAt

      public RecordResponse.Builder updatedAt(Optional<String> updatedAt)

      When the record was last updated, as an ISO-8601 UTC timestamp.

    • updatedAt

      public RecordResponse.Builder updatedAt(String updatedAt)
    • version

      public RecordResponse.Builder version(Optional<Long> version)

      Optimistic-concurrency version. Pass this value back as expectedVersion on a later update to avoid silently overwriting a concurrent change — the update is rejected with 409 VERSION_CONFLICT if the record changed in the meantime. Incremented on every successful write.

    • version

      public RecordResponse.Builder version(Long version)
    • expiresAt

      public RecordResponse.Builder expiresAt(Optional<String> expiresAt)

      The record's absolute expiry as an ISO-8601 UTC timestamp, when a TTL is set (#630) — the record is automatically deleted at (or shortly after) this time. Null when the record has no expiry.

    • expiresAt

      public RecordResponse.Builder expiresAt(String expiresAt)
    • build

      public RecordResponse build()
    • additionalProperty

      public RecordResponse.Builder additionalProperty(String key, Object value)
    • additionalProperties

      public RecordResponse.Builder additionalProperties(Map<String,Object> additionalProperties)