Package ai.extend.types
Class ExtractionField.Builder
- java.lang.Object
-
- ai.extend.types.ExtractionField.Builder
-
- All Implemented Interfaces:
ExtractionField._FinalStage,ExtractionField.DescriptionStage,ExtractionField.IdStage,ExtractionField.NameStage,ExtractionField.TypeStage
- Enclosing class:
- ExtractionField
public static final class ExtractionField.Builder extends java.lang.Object implements ExtractionField.IdStage, ExtractionField.NameStage, ExtractionField.TypeStage, ExtractionField.DescriptionStage, ExtractionField._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractionFieldbuild()ExtractionField._FinalStagedescription(java.lang.String description)Detailed description of the field, including expected content and format.ExtractionField._FinalStageenum_(java.util.List<Enum> enum_)Required when type is "enum".ExtractionField._FinalStageenum_(java.util.Optional<java.util.List<Enum>> enum_)Required when type is "enum".ExtractionField.Builderfrom(ExtractionField other)ExtractionField.NameStageid(java.lang.String id)Unique identifier for the field.ExtractionField.TypeStagename(java.lang.String name)Human-readable name for the field.ExtractionField._FinalStageschema(java.util.List<ExtractionField> schema)Required when type is "array" or "object".ExtractionField._FinalStageschema(java.util.Optional<java.util.List<ExtractionField>> schema)Required when type is "array" or "object".ExtractionField.DescriptionStagetype(ExtractionFieldType type)The type of the field.
-
-
-
Method Detail
-
from
public ExtractionField.Builder from(ExtractionField other)
- Specified by:
fromin interfaceExtractionField.IdStage
-
id
public ExtractionField.NameStage id(@NotNull java.lang.String id)
Unique identifier for the field.
Unique identifier for the field.
- Specified by:
idin interfaceExtractionField.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
name
public ExtractionField.TypeStage name(@NotNull java.lang.String name)
Human-readable name for the field.
Human-readable name for the field.
- Specified by:
namein interfaceExtractionField.NameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
type
public ExtractionField.DescriptionStage type(@NotNull ExtractionFieldType type)
The type of the field.
The type of the field.
- Specified by:
typein interfaceExtractionField.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
description
public ExtractionField._FinalStage description(@NotNull java.lang.String description)
Detailed description of the field, including expected content and format.
Detailed description of the field, including expected content and format.
- Specified by:
descriptionin interfaceExtractionField.DescriptionStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
enum_
public ExtractionField._FinalStage enum_(java.util.List<Enum> enum_)
Required when type is "enum". List of allowed values.
- Specified by:
enum_in interfaceExtractionField._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
enum_
public ExtractionField._FinalStage enum_(java.util.Optional<java.util.List<Enum>> enum_)
Required when type is "enum". List of allowed values.
- Specified by:
enum_in interfaceExtractionField._FinalStage
-
schema
public ExtractionField._FinalStage schema(java.util.List<ExtractionField> schema)
Required when type is "array" or "object". Contains nested field definitions.
- Specified by:
schemain interfaceExtractionField._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
schema
public ExtractionField._FinalStage schema(java.util.Optional<java.util.List<ExtractionField>> schema)
Required when type is "array" or "object". Contains nested field definitions.
- Specified by:
schemain interfaceExtractionField._FinalStage
-
build
public ExtractionField build()
- Specified by:
buildin interfaceExtractionField._FinalStage
-
-