Package com.google.genai.types
Class CachedContent
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CachedContent
A resource used in LLM queries for users to explicitly specify what to cache.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CachedContent.Builder
builder()
Instantiates a builder for CachedContent.Creation time of the cache entry.The user-generated meaningful display name of the cached content.Expiration time of the cached content.static CachedContent
Deserializes a JSON string to a CachedContent object.model()
The name of the publisher model to use for cached content.name()
The server-generated resource name of the cached content.abstract CachedContent.Builder
Creates a builder with the same values as this instance.When the cache entry was last updated in UTC time.abstract Optional<CachedContentUsageMetadata>
Metadata on the usage of the cached content.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
CachedContent
public CachedContent()
-
-
Method Details
-
name
The server-generated resource name of the cached content. -
displayName
The user-generated meaningful display name of the cached content. -
model
The name of the publisher model to use for cached content. -
createTime
Creation time of the cache entry. -
updateTime
When the cache entry was last updated in UTC time. -
expireTime
Expiration time of the cached content. -
usageMetadata
Metadata on the usage of the cached content. -
builder
Instantiates a builder for CachedContent. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a CachedContent object.
-