Class EntityRequest.Builder

java.lang.Object
ai.vectros.types.EntityRequest.Builder
All Implemented Interfaces:
EntityRequest._FinalStage, EntityRequest.ExternalIdStage
Enclosing class:
EntityRequest

public static final class EntityRequest.Builder extends Object implements EntityRequest.ExternalIdStage, EntityRequest._FinalStage
  • Method Details

    • from

      public EntityRequest.Builder from(EntityRequest other)
      Specified by:
      from in interface EntityRequest.ExternalIdStage
    • externalId

      public EntityRequest._FinalStage externalId(@NotNull @NotNull String externalId)

      Your own unique identifier for this entity, unique within its namespace. Used for idempotent create: if an entity with this externalId already exists in the namespace, it is returned instead of creating a duplicate.

      Your own unique identifier for this entity, unique within its namespace. Used for idempotent create: if an entity with this externalId already exists in the namespace, it is returned instead of creating a duplicate.

      Specified by:
      externalId in interface EntityRequest.ExternalIdStage
      Returns:
      Reference to this so that method calls can be chained together.
    • scopes

      public EntityRequest._FinalStage scopes(List<String> scopes)

      The entity's parent ownership edges, each as <namespace>:<value> (for example org:6ba7b810-...). At most two parents, each in a DIFFERENT namespace from the entity's own. A <value> is 1-128 characters: a letter or digit first, then letters, digits, _ or -. On update, providing scopes REPLACES the full set of parents; omit it to leave ownership unchanged. The entity's own reference (<its namespace>:<its id>) is accepted and ignored, so you can send back the scopes you read from a GET unchanged; any OTHER value in its own namespace is rejected, because a parent edge always crosses namespaces — a value in this entity's own namespace names a peer, not a parent.

      Specified by:
      scopes in interface EntityRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • scopes

      public EntityRequest._FinalStage scopes(Optional<List<String>> scopes)

      The entity's parent ownership edges, each as <namespace>:<value> (for example org:6ba7b810-...). At most two parents, each in a DIFFERENT namespace from the entity's own. A <value> is 1-128 characters: a letter or digit first, then letters, digits, _ or -. On update, providing scopes REPLACES the full set of parents; omit it to leave ownership unchanged. The entity's own reference (<its namespace>:<its id>) is accepted and ignored, so you can send back the scopes you read from a GET unchanged; any OTHER value in its own namespace is rejected, because a parent edge always crosses namespaces — a value in this entity's own namespace names a peer, not a parent.

      Specified by:
      scopes in interface EntityRequest._FinalStage
    • schemaId

      public EntityRequest._FinalStage schemaId(String schemaId)

      Optional ID of a record schema (created via POST /v1/schemas) that governs payload validation and lookup indexing for this entity, and must belong to your account.

      Specified by:
      schemaId in interface EntityRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • schemaId

      public EntityRequest._FinalStage schemaId(Optional<String> schemaId)

      Optional ID of a record schema (created via POST /v1/schemas) that governs payload validation and lookup indexing for this entity, and must belong to your account.

      Specified by:
      schemaId in interface EntityRequest._FinalStage
    • payload

      public EntityRequest._FinalStage payload(Map<String,Object> payload)

      Free-form key-value attributes to store with the entity. On update, the supplied object replaces the stored payload in full (it is not key-merged); omit it to leave the stored payload unchanged.

      Specified by:
      payload in interface EntityRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • payload

      public EntityRequest._FinalStage payload(Optional<Map<String,Object>> payload)

      Free-form key-value attributes to store with the entity. On update, the supplied object replaces the stored payload in full (it is not key-merged); omit it to leave the stored payload unchanged.

      Specified by:
      payload in interface EntityRequest._FinalStage
    • status

      Lifecycle status of the entity. ACTIVE entities can be used normally; SUSPENDED entities are retained but blocked from new operations.

      Specified by:
      status in interface EntityRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • status

      Lifecycle status of the entity. ACTIVE entities can be used normally; SUSPENDED entities are retained but blocked from new operations.

      Specified by:
      status in interface EntityRequest._FinalStage
    • name

      public EntityRequest._FinalStage name(String name)

      Human-readable name for the entity.

      Specified by:
      name in interface EntityRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • name

      Human-readable name for the entity.

      Specified by:
      name in interface EntityRequest._FinalStage
    • build

      public EntityRequest build()
      Specified by:
      build in interface EntityRequest._FinalStage
    • additionalProperty

      public EntityRequest.Builder additionalProperty(String key, Object value)
      Specified by:
      additionalProperty in interface EntityRequest._FinalStage
    • additionalProperties

      public EntityRequest.Builder additionalProperties(Map<String,Object> additionalProperties)
      Specified by:
      additionalProperties in interface EntityRequest._FinalStage