Package com.google.genai.types
Class CachedContentUsageMetadata
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CachedContentUsageMetadata
Metadata on the usage of the cached content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for CachedContentUsageMetadata. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDuration of audio in seconds.builder()Instantiates a builder for CachedContentUsageMetadata.static CachedContentUsageMetadataDeserializes a JSON string to a CachedContentUsageMetadata object.Number of images.Number of text characters.abstract CachedContentUsageMetadata.BuilderCreates a builder with the same values as this instance.Total number of tokens that the cached content consumes.Duration of video in seconds.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
CachedContentUsageMetadata
public CachedContentUsageMetadata()
-
-
Method Details
-
audioDurationSeconds
Duration of audio in seconds. This field is not supported in Gemini API. -
imageCount
Number of images. This field is not supported in Gemini API. -
textCount
Number of text characters. This field is not supported in Gemini API. -
totalTokenCount
Total number of tokens that the cached content consumes. -
videoDurationSeconds
Duration of video in seconds. This field is not supported in Gemini API. -
builder
Instantiates a builder for CachedContentUsageMetadata. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a CachedContentUsageMetadata object.
-