Class RecordResponse

java.lang.Object
ai.vectros.types.RecordResponse

public final class RecordResponse extends Object
  • Method Details

    • getCreated

      public Optional<Boolean> getCreated()
      Returns:
      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.
    • getId

      public Optional<String> getId()
      Returns:
      Unique identifier for this record (UUID), assigned by Vectros at creation.
    • getTypeName

      public Optional<String> getTypeName()
      Returns:
      The record's type, matching the typeName declared on the schema this record was created against.
    • getSchemaId

      public Optional<String> getSchemaId()
      Returns:
      Identifier of the schema this record was validated against.
    • getSchemaVersion

      public Optional<Integer> getSchemaVersion()
      Returns:
      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.
    • getExternalId

      public Optional<String> getExternalId()
      Returns:
      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.
    • getPayload

      public Optional<Map<String,Object>> getPayload()
      Returns:
      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.
    • getPayloadExternalized

      public Optional<Boolean> getPayloadExternalized()
      Returns:
      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.
    • getPayloadBytes

      public Optional<Long> getPayloadBytes()
      Returns:
      Size in bytes of the full externalized payload. Present only when payloadExternalized is true.
    • getStatus

      public Optional<String> getStatus()
      Returns:
      Record lifecycle status. ACTIVE records are live. Use this field to model soft-delete or workflow states without physically deleting records.
    • getFolderId

      public Optional<String> getFolderId()
      Returns:
      Identifier of the folder grouping this record. A folder can group both records and documents together.
    • getUserId

      public Optional<String> getUserId()
      Returns:
      Identifier of the owning user (a Vectros-assigned UUID). Set automatically from the calling token's identity when the token carries a user identity.
    • getOrgId

      public Optional<String> getOrgId()
      Returns:
      Identifier of the owning organization (a Vectros-assigned UUID). Set automatically from the calling token's identity when the token carries an organization identity.
    • getClientId

      public Optional<String> getClientId()
      Returns:
      Identifier of the associated client (a Vectros-assigned UUID). Set automatically from the calling token's identity when the token carries a client identity.
    • getIndexStatus

      public Optional<RecordResponseIndexStatus> getIndexStatus()
      Returns:
      Search-index status. PENDING_INDEX means the record is queued for indexing. INDEXED means it is searchable via POST /v1/search. 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.
    • getIndexMode

      public Optional<RecordResponseIndexMode> getIndexMode()
      Returns:
      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.
    • getCreatedBy

      public Optional<String> getCreatedBy()
      Returns:
      Identifier of the API key or scoped token that created this record (for example, key_abc123 for an API key).
    • getCreatedAt

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

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

      public Optional<Long> getVersion()
      Returns:
      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.
    • 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 RecordResponse.Builder builder()