Record Class GeminiFiles.GeminiFile
java.lang.Object
java.lang.Record
dev.langchain4j.model.googleai.GeminiFiles.GeminiFile
- Record Components:
name- The name of the file. This is a required field.displayName- An optional display name for the file, which may be different from the actual file name.mimeType- The MIME type of the file, indicating the nature and format of the file content.sizeBytes- The size of the file in bytes.createTime- The timestamp indicating when the file was created, formatted as an ISO-8601 string.updateTime- The timestamp indicating when the file was last updated, formatted as an ISO 8601 string.expirationTime- The timestamp indicating when the file will expire, formatted as an ISO-8601 string.sha256Hash- The SHA-256 hash of the file, used for integrity verification.uri- The URI where the file can be accessed.state- The current state of the file (e.g., active, deleted).
- Enclosing class:
GeminiFiles
public static record GeminiFiles.GeminiFile(String name, @Nullable String displayName, String mimeType, Long sizeBytes, String createTime, String updateTime, String expirationTime, String sha256Hash, String uri, String state)
extends Record
Represents a file uploaded to the Gemini API,
documentation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreateTimerecord component.@Nullable StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationTimerecord component.final inthashCode()Returns a hash code value for this object.booleanisActive()Returns whether the file is in ACTIVE state and ready to use.booleanisFailed()Returns whether the file failed to process.booleanReturns whether the file is still processing.mimeType()Returns the value of themimeTyperecord component.name()Returns the value of thenamerecord component.Returns the value of thesha256Hashrecord component.Returns the value of thesizeBytesrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateTimerecord component.uri()Returns the value of theurirecord component.
-
Constructor Details
-
GeminiFile
public GeminiFile(String name, @Nullable String displayName, String mimeType, Long sizeBytes, String createTime, String updateTime, String expirationTime, String sha256Hash, String uri, String state) Creates an instance of aGeminiFilerecord class.- Parameters:
name- the value for thenamerecord componentdisplayName- the value for thedisplayNamerecord componentmimeType- the value for themimeTyperecord componentsizeBytes- the value for thesizeBytesrecord componentcreateTime- the value for thecreateTimerecord componentupdateTime- the value for theupdateTimerecord componentexpirationTime- the value for theexpirationTimerecord componentsha256Hash- the value for thesha256Hashrecord componenturi- the value for theurirecord componentstate- the value for thestaterecord component
-
-
Method Details
-
isActive
public boolean isActive()Returns whether the file is in ACTIVE state and ready to use. -
isProcessing
public boolean isProcessing()Returns whether the file is still processing. -
isFailed
public boolean isFailed()Returns whether the file failed to process. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
mimeType
-
sizeBytes
-
createTime
Returns the value of thecreateTimerecord component.- Returns:
- the value of the
createTimerecord component
-
updateTime
Returns the value of theupdateTimerecord component.- Returns:
- the value of the
updateTimerecord component
-
expirationTime
Returns the value of theexpirationTimerecord component.- Returns:
- the value of the
expirationTimerecord component
-
sha256Hash
Returns the value of thesha256Hashrecord component.- Returns:
- the value of the
sha256Hashrecord component
-
uri
-
state
-