Class CreateCachedContentConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CreateCachedContentConfig

public abstract class CreateCachedContentConfig extends JsonSerializable
Optional configuration for cached content creation.
  • Constructor Details

    • CreateCachedContentConfig

      public CreateCachedContentConfig()
  • Method Details

    • httpOptions

      public abstract Optional<HttpOptions> httpOptions()
      Used to override HTTP request options.
    • ttl

      public 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

      public abstract Optional<Instant> expireTime()
      Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z.
    • displayName

      public abstract Optional<String> displayName()
      The user-generated meaningful display name of the cached content.
    • contents

      public abstract Optional<List<Content>> contents()
      The content to cache.
    • systemInstruction

      public abstract Optional<Content> systemInstruction()
      Developer set system instruction.
    • tools

      public abstract Optional<List<Tool>> tools()
      A list of `Tools` the model may use to generate the next response.
    • toolConfig

      public abstract Optional<ToolConfig> toolConfig()
      Configuration for the tools to use. This config is shared for all tools.
    • kmsKeyName

      public 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

      public static CreateCachedContentConfig.Builder builder()
      Instantiates a builder for CreateCachedContentConfig.
    • toBuilder

      public abstract CreateCachedContentConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static CreateCachedContentConfig fromJson(String jsonString)
      Deserializes a JSON string to a CreateCachedContentConfig object.