Class GenerateContentResponseUsageMetadata.Builder
- Enclosing class:
- GenerateContentResponseUsageMetadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract GenerateContentResponseUsageMetadatabuild()cachedContentTokenCount(Integer cachedContentTokenCount) Setter for cachedContentTokenCount.cacheTokensDetails(ModalityTokenCount... cacheTokensDetails) Setter for cacheTokensDetails.cacheTokensDetails(ModalityTokenCount.Builder... cacheTokensDetailsBuilders) Setter for cacheTokensDetails builder.cacheTokensDetails(List<ModalityTokenCount> cacheTokensDetails) Setter for cacheTokensDetails.candidatesTokenCount(Integer candidatesTokenCount) Setter for candidatesTokenCount.candidatesTokensDetails(ModalityTokenCount... candidatesTokensDetails) Setter for candidatesTokensDetails.candidatesTokensDetails(ModalityTokenCount.Builder... candidatesTokensDetailsBuilders) Setter for candidatesTokensDetails builder.candidatesTokensDetails(List<ModalityTokenCount> candidatesTokensDetails) Setter for candidatesTokensDetails.Clears the value of cachedContentTokenCount field.Clears the value of cacheTokensDetails field.Clears the value of candidatesTokenCount field.Clears the value of candidatesTokensDetails field.Clears the value of promptTokenCount field.Clears the value of promptTokensDetails field.Clears the value of thoughtsTokenCount field.Clears the value of toolUsePromptTokenCount field.Clears the value of toolUsePromptTokensDetails field.Clears the value of totalTokenCount field.Clears the value of trafficType field.promptTokenCount(Integer promptTokenCount) Setter for promptTokenCount.promptTokensDetails(ModalityTokenCount... promptTokensDetails) Setter for promptTokensDetails.promptTokensDetails(ModalityTokenCount.Builder... promptTokensDetailsBuilders) Setter for promptTokensDetails builder.promptTokensDetails(List<ModalityTokenCount> promptTokensDetails) Setter for promptTokensDetails.thoughtsTokenCount(Integer thoughtsTokenCount) Setter for thoughtsTokenCount.toolUsePromptTokenCount(Integer toolUsePromptTokenCount) Setter for toolUsePromptTokenCount.toolUsePromptTokensDetails(ModalityTokenCount... toolUsePromptTokensDetails) Setter for toolUsePromptTokensDetails.toolUsePromptTokensDetails(ModalityTokenCount.Builder... toolUsePromptTokensDetailsBuilders) Setter for toolUsePromptTokensDetails builder.toolUsePromptTokensDetails(List<ModalityTokenCount> toolUsePromptTokensDetails) Setter for toolUsePromptTokensDetails.totalTokenCount(Integer totalTokenCount) Setter for totalTokenCount.trafficType(TrafficType trafficType) Setter for trafficType.trafficType(TrafficType.Known knownType) Setter for trafficType given a known enum.trafficType(String trafficType) Setter for trafficType given a string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cacheTokensDetails
public 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 public GenerateContentResponseUsageMetadata.Builder cacheTokensDetails(ModalityTokenCount... cacheTokensDetails) Setter for cacheTokensDetails.cacheTokensDetails: Output only. A detailed breakdown of the token count for each modality in the cached content.
-
cacheTokensDetails
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder cacheTokensDetails(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
Clears the value of cacheTokensDetails field. -
cachedContentTokenCount
public 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 public GenerateContentResponseUsageMetadata.Builder clearCachedContentTokenCount()Clears the value of cachedContentTokenCount field. -
candidatesTokenCount
public abstract GenerateContentResponseUsageMetadata.Builder candidatesTokenCount(Integer candidatesTokenCount) Setter for candidatesTokenCount.candidatesTokenCount: The total number of tokens in the generated candidates.
-
clearCandidatesTokenCount
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder clearCandidatesTokenCount()Clears the value of candidatesTokenCount field. -
candidatesTokensDetails
public 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 public GenerateContentResponseUsageMetadata.Builder candidatesTokensDetails(ModalityTokenCount... candidatesTokensDetails) Setter for candidatesTokensDetails.candidatesTokensDetails: Output only. A detailed breakdown of the token count for each modality in the generated candidates.
-
candidatesTokensDetails
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder candidatesTokensDetails(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 public GenerateContentResponseUsageMetadata.Builder clearCandidatesTokensDetails()Clears the value of candidatesTokensDetails field. -
promptTokenCount
public 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
Clears the value of promptTokenCount field. -
promptTokensDetails
public 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 public GenerateContentResponseUsageMetadata.Builder promptTokensDetails(ModalityTokenCount... promptTokensDetails) Setter for promptTokensDetails.promptTokensDetails: Output only. A detailed breakdown of the token count for each modality in the prompt.
-
promptTokensDetails
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder promptTokensDetails(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 public GenerateContentResponseUsageMetadata.Builder clearPromptTokensDetails()Clears the value of promptTokensDetails field. -
thoughtsTokenCount
public 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
Clears the value of thoughtsTokenCount field. -
toolUsePromptTokenCount
public 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 public GenerateContentResponseUsageMetadata.Builder clearToolUsePromptTokenCount()Clears the value of toolUsePromptTokenCount field. -
toolUsePromptTokensDetails
public 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 public GenerateContentResponseUsageMetadata.Builder toolUsePromptTokensDetails(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 public GenerateContentResponseUsageMetadata.Builder toolUsePromptTokensDetails(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 public GenerateContentResponseUsageMetadata.Builder clearToolUsePromptTokensDetails()Clears the value of toolUsePromptTokensDetails field. -
totalTokenCount
public 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
Clears the value of totalTokenCount field. -
trafficType
Setter for trafficType.trafficType: Output only. The traffic type for this request.
-
clearTrafficType
Clears the value of trafficType field. -
trafficType
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder trafficType(TrafficType.Known knownType) Setter for trafficType given a known enum.trafficType: Output only. The traffic type for this request.
-
trafficType
@CanIgnoreReturnValue public GenerateContentResponseUsageMetadata.Builder trafficType(String trafficType) Setter for trafficType given a string.trafficType: Output only. The traffic type for this request.
-
build
-