Package ai.extend.types
Class File
- java.lang.Object
-
- ai.extend.types.File
-
public final class File extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFile._FinalStagestatic classFile.Builderstatic interfaceFile.CreatedAtStagestatic interfaceFile.IdStagestatic interfaceFile.MetadataStagestatic interfaceFile.NameStagestatic interfaceFile.ObjectStagestatic interfaceFile.UpdatedAtStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static File.ObjectStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<FileContents>getContents()java.time.OffsetDateTimegetCreatedAt()java.lang.StringgetId()FileMetadatagetMetadata()java.lang.StringgetName()java.lang.StringgetObject()java.util.Optional<java.lang.String>getParentFileId()java.util.Optional<java.lang.String>getPresignedUrl()java.util.Optional<FileType>getType()java.time.OffsetDateTimegetUpdatedAt()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getObject
public java.lang.String getObject()
- Returns:
- The type of response. In this case, it will always be "file".
-
getId
public java.lang.String getId()
- Returns:
- Extend's internal ID for the file. It will always start with
"file_".Example:
"file_xK9mLPqRtN3vS8wF5hB2cQ"
-
getName
public java.lang.String getName()
- Returns:
- The name of the file
Example:
"Invoices.pdf"
-
getType
public java.util.Optional<FileType> getType()
- Returns:
- The type of the file
-
getPresignedUrl
public java.util.Optional<java.lang.String> getPresignedUrl()
- Returns:
- A presigned URL to download the file. Expires after 15 minutes.
-
getParentFileId
public java.util.Optional<java.lang.String> getParentFileId()
- Returns:
- 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.
-
getContents
public java.util.Optional<FileContents> getContents()
-
getMetadata
public FileMetadata getMetadata()
-
getCreatedAt
public java.time.OffsetDateTime getCreatedAt()
- Returns:
- The time (in UTC) at which the file was created. Will follow the RFC 3339 format.
Example:
"2024-03-21T15:30:00Z"
-
getUpdatedAt
public java.time.OffsetDateTime getUpdatedAt()
- Returns:
- The time (in UTC) at which the file was last updated. Will follow the RFC 3339 format.
Example:
"2024-03-21T16:45:00Z"
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static File.ObjectStage builder()
-
-