Package com.google.genai.types
Class CreateCachedContentConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CreateCachedContentConfig
Optional configuration for cached content creation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for CreateCachedContentConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Instantiates a builder for CreateCachedContentConfig.contents()
The content to cache.The user-generated meaningful display name of the cached content.Timestamp of when this resource is considered expired.static CreateCachedContentConfig
Deserializes a JSON string to a CreateCachedContentConfig object.abstract Optional<HttpOptions>
Used to override HTTP request options.The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource.Developer set system instruction.abstract CreateCachedContentConfig.Builder
Creates a builder with the same values as this instance.abstract Optional<ToolConfig>
Configuration for the tools to use.tools()
A list of `Tools` the model may use to generate the next response.ttl()
The TTL for this resource.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
CreateCachedContentConfig
public CreateCachedContentConfig()
-
-
Method Details
-
httpOptions
Used to override HTTP request options. -
ttl
The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". -
expireTime
Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. -
displayName
The user-generated meaningful display name of the cached content. -
contents
The content to cache. -
systemInstruction
Developer set system instruction. -
tools
A list of `Tools` the model may use to generate the next response. -
toolConfig
Configuration for the tools to use. This config is shared for all tools. -
kmsKeyName
The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. The key needs to be in the same region as where the compute resource is created. See https://cloud.google.com/vertex-ai/docs/general/cmek for more details. If this is set, then all created CachedContent objects will be encrypted with the provided encryption key. Allowed formats: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} -
builder
Instantiates a builder for CreateCachedContentConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a CreateCachedContentConfig object.
-