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 cachecreateTime- the timestamp indicating when the cache was created, formatted as an ISO-8601 stringupdateTime- the timestamp indicating when the cache was last updated, formatted as an ISO-8601 stringexpireTime- the timestamp indicating when the cache expires, formatted as an ISO-8601 stringusageMetadata- 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionGeminiCachedContent(String name, String model, String displayName, String createTime, String updateTime, String expireTime, GeminiCaches.GeminiCachedContent.UsageMetadata usageMetadata) Creates an instance of aGeminiCachedContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreateTimerecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpireTimerecord component.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateTimerecord component.Returns the value of theusageMetadatarecord component.
-
Constructor Details
-
GeminiCachedContent
public GeminiCachedContent(String name, String model, String displayName, String createTime, String updateTime, String expireTime, GeminiCaches.GeminiCachedContent.UsageMetadata usageMetadata) Creates an instance of aGeminiCachedContentrecord class.- Parameters:
name- the value for thenamerecord componentmodel- the value for themodelrecord componentdisplayName- the value for thedisplayNamerecord componentcreateTime- the value for thecreateTimerecord componentupdateTime- the value for theupdateTimerecord componentexpireTime- the value for theexpireTimerecord componentusageMetadata- the value for theusageMetadatarecord component
-
-
Method Details
-
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
-
model
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
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
-
expireTime
Returns the value of theexpireTimerecord component.- Returns:
- the value of the
expireTimerecord component
-
usageMetadata
Returns the value of theusageMetadatarecord component.- Returns:
- the value of the
usageMetadatarecord component
-