Record Class GeminiCaches.GeminiCachedContent

java.lang.Object
java.lang.Record
dev.langchain4j.model.googleai.GeminiCaches.GeminiCachedContent
Record Components:
name - the resource name of the cache (e.g., "cachedContents/abc123")
model - the fully qualified name of the model the cache is bound to (e.g., "models/gemini-2.5-flash")
displayName - an optional display name for the cache
createTime - the timestamp indicating when the cache was created, formatted as an ISO-8601 string
updateTime - the timestamp indicating when the cache was last updated, formatted as an ISO-8601 string
expireTime - the timestamp indicating when the cache expires, formatted as an ISO-8601 string
usageMetadata - the token usage of the cached content
Enclosing class:
GeminiCaches

public static record GeminiCaches.GeminiCachedContent(String name, String model, String displayName, String createTime, String updateTime, String expireTime, GeminiCaches.GeminiCachedContent.UsageMetadata usageMetadata) extends Record
Represents a Gemini context cache, documentation
  • Constructor Details

  • Method Details

    • 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
    • model

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

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName 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
    • expireTime

      public String expireTime()
      Returns the value of the expireTime record component.
      Returns:
      the value of the expireTime record component
    • usageMetadata

      Returns the value of the usageMetadata record component.
      Returns:
      the value of the usageMetadata record component