Class GenerateContentResponseUsageMetadata.Builder
-
- All Implemented Interfaces:
public abstract class GenerateContentResponseUsageMetadata.BuilderBuilder for GenerateContentResponseUsageMetadata.
-
-
Constructor Summary
Constructors Constructor Description GenerateContentResponseUsageMetadata.Builder()
-
Method Summary
-
-
Method Detail
-
cacheTokensDetails
abstract GenerateContentResponseUsageMetadata.Builder cacheTokensDetails(List<ModalityTokenCount> cacheTokensDetails)
Setter for cacheTokensDetails.
cacheTokensDetails: Output only. A detailed breakdown of the token count for each modality in the cached content.
-
cacheTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder cacheTokensDetails(Array<ModalityTokenCount> cacheTokensDetails)
Setter for cacheTokensDetails.
cacheTokensDetails: Output only. A detailed breakdown of the token count for each modality in the cached content.
-
cacheTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder cacheTokensDetails(Array<ModalityTokenCount.Builder> cacheTokensDetailsBuilders)
Setter for cacheTokensDetails builder.
cacheTokensDetails: Output only. A detailed breakdown of the token count for each modality in the cached content.
-
clearCacheTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearCacheTokensDetails()
Clears the value of cacheTokensDetails field.
-
cachedContentTokenCount
abstract GenerateContentResponseUsageMetadata.Builder cachedContentTokenCount(Integer cachedContentTokenCount)
Setter for cachedContentTokenCount.
cachedContentTokenCount: Output only. The number of tokens in the cached content that was used for this request.
-
clearCachedContentTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearCachedContentTokenCount()
Clears the value of cachedContentTokenCount field.
-
candidatesTokenCount
abstract GenerateContentResponseUsageMetadata.Builder candidatesTokenCount(Integer candidatesTokenCount)
Setter for candidatesTokenCount.
candidatesTokenCount: The total number of tokens in the generated candidates.
-
clearCandidatesTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearCandidatesTokenCount()
Clears the value of candidatesTokenCount field.
-
candidatesTokensDetails
abstract GenerateContentResponseUsageMetadata.Builder candidatesTokensDetails(List<ModalityTokenCount> candidatesTokensDetails)
Setter for candidatesTokensDetails.
candidatesTokensDetails: Output only. A detailed breakdown of the token count for each modality in the generated candidates.
-
candidatesTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder candidatesTokensDetails(Array<ModalityTokenCount> candidatesTokensDetails)
Setter for candidatesTokensDetails.
candidatesTokensDetails: Output only. A detailed breakdown of the token count for each modality in the generated candidates.
-
candidatesTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder candidatesTokensDetails(Array<ModalityTokenCount.Builder> candidatesTokensDetailsBuilders)
Setter for candidatesTokensDetails builder.
candidatesTokensDetails: Output only. A detailed breakdown of the token count for each modality in the generated candidates.
-
clearCandidatesTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearCandidatesTokensDetails()
Clears the value of candidatesTokensDetails field.
-
promptTokenCount
abstract GenerateContentResponseUsageMetadata.Builder promptTokenCount(Integer promptTokenCount)
Setter for promptTokenCount.
promptTokenCount: The total number of tokens in the prompt. This includes any text, images, or other media provided in the request. When `cached_content` is set, this also includes the number of tokens in the cached content.
-
clearPromptTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearPromptTokenCount()
Clears the value of promptTokenCount field.
-
promptTokensDetails
abstract GenerateContentResponseUsageMetadata.Builder promptTokensDetails(List<ModalityTokenCount> promptTokensDetails)
Setter for promptTokensDetails.
promptTokensDetails: Output only. A detailed breakdown of the token count for each modality in the prompt.
-
promptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder promptTokensDetails(Array<ModalityTokenCount> promptTokensDetails)
Setter for promptTokensDetails.
promptTokensDetails: Output only. A detailed breakdown of the token count for each modality in the prompt.
-
promptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder promptTokensDetails(Array<ModalityTokenCount.Builder> promptTokensDetailsBuilders)
Setter for promptTokensDetails builder.
promptTokensDetails: Output only. A detailed breakdown of the token count for each modality in the prompt.
-
clearPromptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearPromptTokensDetails()
Clears the value of promptTokensDetails field.
-
thoughtsTokenCount
abstract GenerateContentResponseUsageMetadata.Builder thoughtsTokenCount(Integer thoughtsTokenCount)
Setter for thoughtsTokenCount.
thoughtsTokenCount: Output only. The number of tokens that were part of the model's generated "thoughts" output, if applicable.
-
clearThoughtsTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearThoughtsTokenCount()
Clears the value of thoughtsTokenCount field.
-
toolUsePromptTokenCount
abstract GenerateContentResponseUsageMetadata.Builder toolUsePromptTokenCount(Integer toolUsePromptTokenCount)
Setter for toolUsePromptTokenCount.
toolUsePromptTokenCount: Output only. The number of tokens in the results from tool executions, which are provided back to the model as input, if applicable.
-
clearToolUsePromptTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearToolUsePromptTokenCount()
Clears the value of toolUsePromptTokenCount field.
-
toolUsePromptTokensDetails
abstract GenerateContentResponseUsageMetadata.Builder toolUsePromptTokensDetails(List<ModalityTokenCount> toolUsePromptTokensDetails)
Setter for toolUsePromptTokensDetails.
toolUsePromptTokensDetails: Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input.
-
toolUsePromptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder toolUsePromptTokensDetails(Array<ModalityTokenCount> toolUsePromptTokensDetails)
Setter for toolUsePromptTokensDetails.
toolUsePromptTokensDetails: Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input.
-
toolUsePromptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder toolUsePromptTokensDetails(Array<ModalityTokenCount.Builder> toolUsePromptTokensDetailsBuilders)
Setter for toolUsePromptTokensDetails builder.
toolUsePromptTokensDetails: Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input.
-
clearToolUsePromptTokensDetails
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearToolUsePromptTokensDetails()
Clears the value of toolUsePromptTokensDetails field.
-
totalTokenCount
abstract GenerateContentResponseUsageMetadata.Builder totalTokenCount(Integer totalTokenCount)
Setter for totalTokenCount.
totalTokenCount: The total number of tokens for the entire request. This is the sum of `prompt_token_count`, `candidates_token_count`, `tool_use_prompt_token_count`, and `thoughts_token_count`.
-
clearTotalTokenCount
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearTotalTokenCount()
Clears the value of totalTokenCount field.
-
trafficType
abstract GenerateContentResponseUsageMetadata.Builder trafficType(TrafficType trafficType)
Setter for trafficType.
trafficType: Output only. The traffic type for this request.
-
clearTrafficType
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder clearTrafficType()
Clears the value of trafficType field.
-
trafficType
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder trafficType(TrafficType.Known knownType)
Setter for trafficType given a known enum.
trafficType: Output only. The traffic type for this request.
-
trafficType
@CanIgnoreReturnValue() GenerateContentResponseUsageMetadata.Builder trafficType(String trafficType)
Setter for trafficType given a string.
trafficType: Output only. The traffic type for this request.
-
build
abstract GenerateContentResponseUsageMetadata build()
-
-
-
-