Class File.Builder
- java.lang.Object
-
- ai.extend.types.File.Builder
-
- All Implemented Interfaces:
File._FinalStage,File.CreatedAtStage,File.IdStage,File.MetadataStage,File.NameStage,File.ObjectStage,File.UpdatedAtStage
- Enclosing class:
- File
public static final class File.Builder extends java.lang.Object implements File.ObjectStage, File.IdStage, File.NameStage, File.MetadataStage, File.CreatedAtStage, File.UpdatedAtStage, File._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filebuild()File._FinalStagecontents(FileContents contents)File._FinalStagecontents(java.util.Optional<FileContents> contents)File.UpdatedAtStagecreatedAt(java.time.OffsetDateTime createdAt)The time (in UTC) at which the file was created.File.Builderfrom(File other)File.NameStageid(java.lang.String id)Extend's internal ID for the file.File.CreatedAtStagemetadata(FileMetadata metadata)File.MetadataStagename(java.lang.String name)The name of the fileFile.IdStageobject(java.lang.String object)The type of response.File._FinalStageparentFileId(java.lang.String parentFileId)The ID of the parent file.File._FinalStageparentFileId(java.util.Optional<java.lang.String> parentFileId)The ID of the parent file.File._FinalStagepresignedUrl(java.lang.String presignedUrl)A presigned URL to download the file.File._FinalStagepresignedUrl(java.util.Optional<java.lang.String> presignedUrl)A presigned URL to download the file.File._FinalStagetype(FileType type)The type of the fileFile._FinalStagetype(java.util.Optional<FileType> type)The type of the fileFile._FinalStageupdatedAt(java.time.OffsetDateTime updatedAt)The time (in UTC) at which the file was last updated.
-
-
-
Method Detail
-
from
public File.Builder from(File other)
- Specified by:
fromin interfaceFile.ObjectStage
-
object
public File.IdStage object(@NotNull java.lang.String object)
The type of response. In this case, it will always be "file".
The type of response. In this case, it will always be "file".
- Specified by:
objectin interfaceFile.ObjectStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
id
public File.NameStage id(@NotNull java.lang.String id)
Extend's internal ID for the file. It will always start with
"file_".Example:
"file_xK9mLPqRtN3vS8wF5hB2cQ"Extend's internal ID for the file. It will always start with
"file_".Example:
"file_xK9mLPqRtN3vS8wF5hB2cQ"- Specified by:
idin interfaceFile.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
name
public File.MetadataStage name(@NotNull java.lang.String name)
The name of the file
Example:
"Invoices.pdf"The name of the file
Example:
"Invoices.pdf"- Specified by:
namein interfaceFile.NameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public File.CreatedAtStage metadata(@NotNull FileMetadata metadata)
- Specified by:
metadatain interfaceFile.MetadataStage
-
createdAt
public File.UpdatedAtStage createdAt(@NotNull java.time.OffsetDateTime createdAt)
The time (in UTC) at which the file was created. Will follow the RFC 3339 format.
Example:
"2024-03-21T15:30:00Z"The time (in UTC) at which the file was created. Will follow the RFC 3339 format.
Example:
"2024-03-21T15:30:00Z"- Specified by:
createdAtin interfaceFile.CreatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
updatedAt
public File._FinalStage updatedAt(@NotNull java.time.OffsetDateTime updatedAt)
The time (in UTC) at which the file was last updated. Will follow the RFC 3339 format.
Example:
"2024-03-21T16:45:00Z"The time (in UTC) at which the file was last updated. Will follow the RFC 3339 format.
Example:
"2024-03-21T16:45:00Z"- Specified by:
updatedAtin interfaceFile.UpdatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
contents
public File._FinalStage contents(FileContents contents)
- Specified by:
contentsin interfaceFile._FinalStage
-
contents
public File._FinalStage contents(java.util.Optional<FileContents> contents)
- Specified by:
contentsin interfaceFile._FinalStage
-
parentFileId
public File._FinalStage parentFileId(java.lang.String parentFileId)
The ID of the parent file. Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.
- Specified by:
parentFileIdin interfaceFile._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parentFileId
public File._FinalStage parentFileId(java.util.Optional<java.lang.String> parentFileId)
The ID of the parent file. Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.
- Specified by:
parentFileIdin interfaceFile._FinalStage
-
presignedUrl
public File._FinalStage presignedUrl(java.lang.String presignedUrl)
A presigned URL to download the file. Expires after 15 minutes.
- Specified by:
presignedUrlin interfaceFile._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
presignedUrl
public File._FinalStage presignedUrl(java.util.Optional<java.lang.String> presignedUrl)
A presigned URL to download the file. Expires after 15 minutes.
- Specified by:
presignedUrlin interfaceFile._FinalStage
-
type
public File._FinalStage type(FileType type)
The type of the file
- Specified by:
typein interfaceFile._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
type
public File._FinalStage type(java.util.Optional<FileType> type)
The type of the file
- Specified by:
typein interfaceFile._FinalStage
-
build
public File build()
- Specified by:
buildin interfaceFile._FinalStage
-
-