Class CreateCachedContentConfig
-
- All Implemented Interfaces:
public abstract class CreateCachedContentConfig extends JsonSerializable
Optional configuration for cached content creation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classCreateCachedContentConfig.BuilderBuilder for CreateCachedContentConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description CreateCachedContentConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<Duration>ttl()The TTL for this resource. abstract Optional<Instant>expireTime()Timestamp of when this resource is considered expired. abstract Optional<String>displayName()The user-generated meaningful display name of the cached content. abstract Optional<List<Content>>contents()The content to cache. abstract Optional<Content>systemInstruction()Developer set system instruction. abstract Optional<List<Tool>>tools()A list of `Tools` the model may use to generate the next response. abstract Optional<ToolConfig>toolConfig()Configuration for the tools to use. abstract Optional<String>kmsKeyName()The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. static CreateCachedContentConfig.Builderbuilder()Instantiates a builder for CreateCachedContentConfig. abstract CreateCachedContentConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static CreateCachedContentConfigfromJson(String jsonString)Deserializes a JSON string to a CreateCachedContentConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
ttl
abstract Optional<Duration> 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
abstract Optional<Instant> expireTime()
Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z.
-
displayName
abstract Optional<String> displayName()
The user-generated meaningful display name of the cached content.
-
systemInstruction
abstract Optional<Content> systemInstruction()
Developer set system instruction.
-
tools
abstract Optional<List<Tool>> tools()
A list of `Tools` the model may use to generate the next response.
-
toolConfig
abstract Optional<ToolConfig> toolConfig()
Configuration for the tools to use. This config is shared for all tools.
-
kmsKeyName
abstract Optional<String> 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
static CreateCachedContentConfig.Builder builder()
Instantiates a builder for CreateCachedContentConfig.
-
toBuilder
abstract CreateCachedContentConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static CreateCachedContentConfig fromJson(String jsonString)
Deserializes a JSON string to a CreateCachedContentConfig object.
-
-
-
-