Class CachedContent.Builder

java.lang.Object
com.google.genai.types.CachedContent.Builder
Enclosing class:
CachedContent

public abstract static class CachedContent.Builder extends Object
Builder for CachedContent.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public abstract CachedContent.Builder name(String name)
      Setter for name.

      name: The server-generated resource name of the cached content.

    • clearName

      @CanIgnoreReturnValue public CachedContent.Builder clearName()
      Clears the value of name field.
    • displayName

      public abstract CachedContent.Builder displayName(String displayName)
      Setter for displayName.

      displayName: The user-generated meaningful display name of the cached content.

    • clearDisplayName

      @CanIgnoreReturnValue public CachedContent.Builder clearDisplayName()
      Clears the value of displayName field.
    • model

      public abstract CachedContent.Builder model(String model)
      Setter for model.

      model: The name of the publisher model to use for cached content.

    • clearModel

      @CanIgnoreReturnValue public CachedContent.Builder clearModel()
      Clears the value of model field.
    • createTime

      public abstract CachedContent.Builder createTime(Instant createTime)
      Setter for createTime.

      createTime: Creation time of the cache entry.

    • clearCreateTime

      @CanIgnoreReturnValue public CachedContent.Builder clearCreateTime()
      Clears the value of createTime field.
    • updateTime

      public abstract CachedContent.Builder updateTime(Instant updateTime)
      Setter for updateTime.

      updateTime: When the cache entry was last updated in UTC time.

    • clearUpdateTime

      @CanIgnoreReturnValue public CachedContent.Builder clearUpdateTime()
      Clears the value of updateTime field.
    • expireTime

      public abstract CachedContent.Builder expireTime(Instant expireTime)
      Setter for expireTime.

      expireTime: Expiration time of the cached content.

    • clearExpireTime

      @CanIgnoreReturnValue public CachedContent.Builder clearExpireTime()
      Clears the value of expireTime field.
    • usageMetadata

      public abstract CachedContent.Builder usageMetadata(CachedContentUsageMetadata usageMetadata)
      Setter for usageMetadata.

      usageMetadata: Metadata on the usage of the cached content.

    • usageMetadata

      @CanIgnoreReturnValue public CachedContent.Builder usageMetadata(CachedContentUsageMetadata.Builder usageMetadataBuilder)
      Setter for usageMetadata builder.

      usageMetadata: Metadata on the usage of the cached content.

    • clearUsageMetadata

      @CanIgnoreReturnValue public CachedContent.Builder clearUsageMetadata()
      Clears the value of usageMetadata field.
    • build

      public abstract CachedContent build()