Class CachedContentUsageMetadata.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • audioDurationSeconds

      public abstract CachedContentUsageMetadata.Builder audioDurationSeconds(Integer audioDurationSeconds)
      Setter for audioDurationSeconds.

      audioDurationSeconds: Duration of audio in seconds. This field is not supported in Gemini API.

    • imageCount

      public abstract CachedContentUsageMetadata.Builder imageCount(Integer imageCount)
      Setter for imageCount.

      imageCount: Number of images. This field is not supported in Gemini API.

    • textCount

      public abstract CachedContentUsageMetadata.Builder textCount(Integer textCount)
      Setter for textCount.

      textCount: Number of text characters. This field is not supported in Gemini API.

    • totalTokenCount

      public abstract CachedContentUsageMetadata.Builder totalTokenCount(Integer totalTokenCount)
      Setter for totalTokenCount.

      totalTokenCount: Total number of tokens that the cached content consumes.

    • videoDurationSeconds

      public abstract CachedContentUsageMetadata.Builder videoDurationSeconds(Integer videoDurationSeconds)
      Setter for videoDurationSeconds.

      videoDurationSeconds: Duration of video in seconds. This field is not supported in Gemini API.

    • build

      public abstract CachedContentUsageMetadata build()