Class ExtractorVersion.Builder
- java.lang.Object
-
- ai.extend.types.ExtractorVersion.Builder
-
- All Implemented Interfaces:
ExtractorVersion._FinalStage,ExtractorVersion.ConfigStage,ExtractorVersion.CreatedAtStage,ExtractorVersion.ExtractorIdStage,ExtractorVersion.IdStage,ExtractorVersion.VersionStage
- Enclosing class:
- ExtractorVersion
public static final class ExtractorVersion.Builder extends java.lang.Object implements ExtractorVersion.IdStage, ExtractorVersion.VersionStage, ExtractorVersion.ConfigStage, ExtractorVersion.ExtractorIdStage, ExtractorVersion.CreatedAtStage, ExtractorVersion._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractorVersionbuild()ExtractorVersion.ExtractorIdStageconfig(ExtractConfig config)The configuration settings for this version of the extractor.ExtractorVersion._FinalStagecreatedAt(java.time.OffsetDateTime createdAt)ExtractorVersion._FinalStagedescription(Nullable<java.lang.String> description)A description of this version of the extractor.ExtractorVersion._FinalStagedescription(java.lang.String description)A description of this version of the extractor.ExtractorVersion._FinalStagedescription(java.util.Optional<java.lang.String> description)A description of this version of the extractor.ExtractorVersion.CreatedAtStageextractorId(java.lang.String extractorId)The ID of the extractor that this version belongs to.ExtractorVersion.Builderfrom(ExtractorVersion other)ExtractorVersion.VersionStageid(java.lang.String id)The unique identifier for this version of the extractor.ExtractorVersion.ConfigStageversion(java.lang.String version)The version number or identifier for this specific version of the extractor.
-
-
-
Method Detail
-
from
public ExtractorVersion.Builder from(ExtractorVersion other)
- Specified by:
fromin interfaceExtractorVersion.IdStage
-
id
public ExtractorVersion.VersionStage id(@NotNull java.lang.String id)
The unique identifier for this version of the extractor.
Example:
"exv_xK9mLPqRtN3vS8wF5hB2cQ"The unique identifier for this version of the extractor.
Example:
"exv_xK9mLPqRtN3vS8wF5hB2cQ"- Specified by:
idin interfaceExtractorVersion.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
version
public ExtractorVersion.ConfigStage version(@NotNull java.lang.String version)
The version number or identifier for this specific version of the extractor. The draft version will have version="draft".
Examples:
"1.0","2.1","draft"The version number or identifier for this specific version of the extractor. The draft version will have version="draft".
Examples:
"1.0","2.1","draft"- Specified by:
versionin interfaceExtractorVersion.VersionStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public ExtractorVersion.ExtractorIdStage config(@NotNull ExtractConfig config)
The configuration settings for this version of the extractor. This is a union of two possible shapes:
- JSON Schema config: The current config format. All extractors created through this API version use this shape.
- Legacy config: A fields-array config from a previous API version. This shape is only returned for extractors that were originally configured with the legacy format. This API version does not support creating extractors with legacy configs.
The configuration settings for this version of the extractor. This is a union of two possible shapes:
- JSON Schema config: The current config format. All extractors created through this API version use this shape.
- Legacy config: A fields-array config from a previous API version. This shape is only returned for extractors that were originally configured with the legacy format. This API version does not support creating extractors with legacy configs.
- Specified by:
configin interfaceExtractorVersion.ConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
extractorId
public ExtractorVersion.CreatedAtStage extractorId(@NotNull java.lang.String extractorId)
The ID of the extractor that this version belongs to.
Example:
"ex_Xj8mK2pL9nR4vT7qY5wZ"The ID of the extractor that this version belongs to.
Example:
"ex_Xj8mK2pL9nR4vT7qY5wZ"- Specified by:
extractorIdin interfaceExtractorVersion.ExtractorIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public ExtractorVersion._FinalStage createdAt(@NotNull java.time.OffsetDateTime createdAt)
- Specified by:
createdAtin interfaceExtractorVersion.CreatedAtStage
-
description
public ExtractorVersion._FinalStage description(Nullable<java.lang.String> description)
A description of this version of the extractor.
Example:
"Updated extraction fields for new invoice format"- Specified by:
descriptionin interfaceExtractorVersion._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
description
public ExtractorVersion._FinalStage description(java.lang.String description)
A description of this version of the extractor.
Example:
"Updated extraction fields for new invoice format"- Specified by:
descriptionin interfaceExtractorVersion._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
description
public ExtractorVersion._FinalStage description(java.util.Optional<java.lang.String> description)
A description of this version of the extractor.
Example:
"Updated extraction fields for new invoice format"- Specified by:
descriptionin interfaceExtractorVersion._FinalStage
-
build
public ExtractorVersion build()
- Specified by:
buildin interfaceExtractorVersion._FinalStage
-
-