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 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 a GeminiFile record class.
      Parameters:
      name - the value for the name record component
      displayName - the value for the displayName record component
      mimeType - the value for the mimeType record component
      sizeBytes - the value for the sizeBytes record component
      createTime - the value for the createTime record component
      updateTime - the value for the updateTime record component
      expirationTime - the value for the expirationTime record component
      sha256Hash - the value for the sha256Hash record component
      uri - the value for the uri record component
      state - the value for the state record 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • displayName

      public @Nullable String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • mimeType

      public String mimeType()
      Returns the value of the mimeType record component.
      Returns:
      the value of the mimeType record component
    • sizeBytes

      public Long sizeBytes()
      Returns the value of the sizeBytes record component.
      Returns:
      the value of the sizeBytes record component
    • createTime

      public String createTime()
      Returns the value of the createTime record component.
      Returns:
      the value of the createTime record component
    • updateTime

      public String updateTime()
      Returns the value of the updateTime record component.
      Returns:
      the value of the updateTime record component
    • expirationTime

      public String expirationTime()
      Returns the value of the expirationTime record component.
      Returns:
      the value of the expirationTime record component
    • sha256Hash

      public String sha256Hash()
      Returns the value of the sha256Hash record component.
      Returns:
      the value of the sha256Hash record component
    • uri

      public String uri()
      Returns the value of the uri record component.
      Returns:
      the value of the uri record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component