Class ExtractorsCreateRequest.Builder
- java.lang.Object
-
- ai.extend.resources.extractors.requests.ExtractorsCreateRequest.Builder
-
- All Implemented Interfaces:
ExtractorsCreateRequest._FinalStage,ExtractorsCreateRequest.NameStage
- Enclosing class:
- ExtractorsCreateRequest
public static final class ExtractorsCreateRequest.Builder extends java.lang.Object implements ExtractorsCreateRequest.NameStage, ExtractorsCreateRequest._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractorsCreateRequestbuild()ExtractorsCreateRequest._FinalStagecloneExtractorId(java.lang.String cloneExtractorId)The ID of an existing extractor to clone.ExtractorsCreateRequest._FinalStagecloneExtractorId(java.util.Optional<java.lang.String> cloneExtractorId)The ID of an existing extractor to clone.ExtractorsCreateRequest._FinalStageconfig(ExtractConfigJson config)The configuration for the extractor.ExtractorsCreateRequest._FinalStageconfig(java.util.Optional<ExtractConfigJson> config)The configuration for the extractor.ExtractorsCreateRequest.Builderfrom(ExtractorsCreateRequest other)ExtractorsCreateRequest._FinalStagegenerate(ExtractorsCreateRequestGenerate generate)If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft.ExtractorsCreateRequest._FinalStagegenerate(java.util.Optional<ExtractorsCreateRequestGenerate> generate)If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft.ExtractorsCreateRequest._FinalStagename(java.lang.String name)The name of the extractor.
-
-
-
Method Detail
-
from
public ExtractorsCreateRequest.Builder from(ExtractorsCreateRequest other)
- Specified by:
fromin interfaceExtractorsCreateRequest.NameStage
-
name
public ExtractorsCreateRequest._FinalStage name(@NotNull java.lang.String name)
The name of the extractor.
The name of the extractor.
- Specified by:
namein interfaceExtractorsCreateRequest.NameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
generate
public ExtractorsCreateRequest._FinalStage generate(ExtractorsCreateRequestGenerate generate)
If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft. The response includes the extractor with the generated schema already in place.
Cannot be provided together with
configorcloneExtractorId.- Specified by:
generatein interfaceExtractorsCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
generate
public ExtractorsCreateRequest._FinalStage generate(java.util.Optional<ExtractorsCreateRequestGenerate> generate)
If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft. The response includes the extractor with the generated schema already in place.
Cannot be provided together with
configorcloneExtractorId.- Specified by:
generatein interfaceExtractorsCreateRequest._FinalStage
-
config
public ExtractorsCreateRequest._FinalStage config(ExtractConfigJson config)
The configuration for the extractor. Cannot be provided together with
cloneExtractorIdorgenerate.- Specified by:
configin interfaceExtractorsCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public ExtractorsCreateRequest._FinalStage config(java.util.Optional<ExtractConfigJson> config)
The configuration for the extractor. Cannot be provided together with
cloneExtractorIdorgenerate.- Specified by:
configin interfaceExtractorsCreateRequest._FinalStage
-
cloneExtractorId
public ExtractorsCreateRequest._FinalStage cloneExtractorId(java.lang.String cloneExtractorId)
The ID of an existing extractor to clone. If provided, the new extractor will be created with the same config as the extractor with this ID. Cannot be provided together with
configorgenerate.Example:
"ex_BMdfq_yWM3sT-ZzvCnA3f"- Specified by:
cloneExtractorIdin interfaceExtractorsCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
cloneExtractorId
public ExtractorsCreateRequest._FinalStage cloneExtractorId(java.util.Optional<java.lang.String> cloneExtractorId)
The ID of an existing extractor to clone. If provided, the new extractor will be created with the same config as the extractor with this ID. Cannot be provided together with
configorgenerate.Example:
"ex_BMdfq_yWM3sT-ZzvCnA3f"- Specified by:
cloneExtractorIdin interfaceExtractorsCreateRequest._FinalStage
-
build
public ExtractorsCreateRequest build()
- Specified by:
buildin interfaceExtractorsCreateRequest._FinalStage
-
-