Class UsageMetadata.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder>
com.google.cloud.aiplatform.v1.UsageMetadata.Builder
All Implemented Interfaces:
UsageMetadataOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
UsageMetadata

public static final class UsageMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder> implements UsageMetadataOrBuilder
 Usage metadata about the content generation request and response.
 This message provides a detailed breakdown of token usage and other
 relevant metrics.
 
Protobuf type google.cloud.aiplatform.v1.UsageMetadata
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder>
    • clear

      public UsageMetadata.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder>
    • getDefaultInstanceForType

      public UsageMetadata getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public UsageMetadata build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public UsageMetadata buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public UsageMetadata.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UsageMetadata.Builder>
    • mergeFrom

      public UsageMetadata.Builder mergeFrom(UsageMetadata other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<UsageMetadata.Builder>
    • mergeFrom

      public UsageMetadata.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UsageMetadata.Builder>
      Throws:
      IOException
    • getPromptTokenCount

      public int getPromptTokenCount()
       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.
       
      int32 prompt_token_count = 1;
      Specified by:
      getPromptTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The promptTokenCount.
    • setPromptTokenCount

      public UsageMetadata.Builder setPromptTokenCount(int value)
       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.
       
      int32 prompt_token_count = 1;
      Parameters:
      value - The promptTokenCount to set.
      Returns:
      This builder for chaining.
    • clearPromptTokenCount

      public UsageMetadata.Builder clearPromptTokenCount()
       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.
       
      int32 prompt_token_count = 1;
      Returns:
      This builder for chaining.
    • getCandidatesTokenCount

      public int getCandidatesTokenCount()
       The total number of tokens in the generated candidates.
       
      int32 candidates_token_count = 2;
      Specified by:
      getCandidatesTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The candidatesTokenCount.
    • setCandidatesTokenCount

      public UsageMetadata.Builder setCandidatesTokenCount(int value)
       The total number of tokens in the generated candidates.
       
      int32 candidates_token_count = 2;
      Parameters:
      value - The candidatesTokenCount to set.
      Returns:
      This builder for chaining.
    • clearCandidatesTokenCount

      public UsageMetadata.Builder clearCandidatesTokenCount()
       The total number of tokens in the generated candidates.
       
      int32 candidates_token_count = 2;
      Returns:
      This builder for chaining.
    • getTotalTokenCount

      public int getTotalTokenCount()
       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`.
       
      int32 total_token_count = 3;
      Specified by:
      getTotalTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The totalTokenCount.
    • setTotalTokenCount

      public UsageMetadata.Builder setTotalTokenCount(int value)
       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`.
       
      int32 total_token_count = 3;
      Parameters:
      value - The totalTokenCount to set.
      Returns:
      This builder for chaining.
    • clearTotalTokenCount

      public UsageMetadata.Builder clearTotalTokenCount()
       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`.
       
      int32 total_token_count = 3;
      Returns:
      This builder for chaining.
    • getToolUsePromptTokenCount

      public int getToolUsePromptTokenCount()
       Output only. The number of tokens in the results from tool executions,
       which are provided back to the model as input, if applicable.
       
      int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The toolUsePromptTokenCount.
    • setToolUsePromptTokenCount

      public UsageMetadata.Builder setToolUsePromptTokenCount(int value)
       Output only. The number of tokens in the results from tool executions,
       which are provided back to the model as input, if applicable.
       
      int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The toolUsePromptTokenCount to set.
      Returns:
      This builder for chaining.
    • clearToolUsePromptTokenCount

      public UsageMetadata.Builder clearToolUsePromptTokenCount()
       Output only. The number of tokens in the results from tool executions,
       which are provided back to the model as input, if applicable.
       
      int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getThoughtsTokenCount

      public int getThoughtsTokenCount()
       Output only. The number of tokens that were part of the model's generated
       "thoughts" output, if applicable.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getThoughtsTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The thoughtsTokenCount.
    • setThoughtsTokenCount

      public UsageMetadata.Builder setThoughtsTokenCount(int value)
       Output only. The number of tokens that were part of the model's generated
       "thoughts" output, if applicable.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The thoughtsTokenCount to set.
      Returns:
      This builder for chaining.
    • clearThoughtsTokenCount

      public UsageMetadata.Builder clearThoughtsTokenCount()
       Output only. The number of tokens that were part of the model's generated
       "thoughts" output, if applicable.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getCachedContentTokenCount

      public int getCachedContentTokenCount()
       Output only. The number of tokens in the cached content that was used for
       this request.
       
      int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCachedContentTokenCount in interface UsageMetadataOrBuilder
      Returns:
      The cachedContentTokenCount.
    • setCachedContentTokenCount

      public UsageMetadata.Builder setCachedContentTokenCount(int value)
       Output only. The number of tokens in the cached content that was used for
       this request.
       
      int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The cachedContentTokenCount to set.
      Returns:
      This builder for chaining.
    • clearCachedContentTokenCount

      public UsageMetadata.Builder clearCachedContentTokenCount()
       Output only. The number of tokens in the cached content that was used for
       this request.
       
      int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getPromptTokensDetailsList

      public List<ModalityTokenCount> getPromptTokensDetailsList()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsList in interface UsageMetadataOrBuilder
    • getPromptTokensDetailsCount

      public int getPromptTokensDetailsCount()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsCount in interface UsageMetadataOrBuilder
    • getPromptTokensDetails

      public ModalityTokenCount getPromptTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetails in interface UsageMetadataOrBuilder
    • setPromptTokensDetails

      public UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setPromptTokensDetails

      public UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public UsageMetadata.Builder addPromptTokensDetails(ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public UsageMetadata.Builder addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllPromptTokensDetails

      public UsageMetadata.Builder addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearPromptTokensDetails

      public UsageMetadata.Builder clearPromptTokensDetails()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removePromptTokensDetails

      public UsageMetadata.Builder removePromptTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPromptTokensDetailsBuilder

      public ModalityTokenCount.Builder getPromptTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPromptTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsOrBuilder in interface UsageMetadataOrBuilder
    • getPromptTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getPromptTokensDetailsOrBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsOrBuilderList in interface UsageMetadataOrBuilder
    • addPromptTokensDetailsBuilder

      public ModalityTokenCount.Builder addPromptTokensDetailsBuilder()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetailsBuilder

      public ModalityTokenCount.Builder addPromptTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPromptTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getPromptTokensDetailsBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the prompt.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsList

      public List<ModalityTokenCount> getCacheTokensDetailsList()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsList in interface UsageMetadataOrBuilder
    • getCacheTokensDetailsCount

      public int getCacheTokensDetailsCount()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsCount in interface UsageMetadataOrBuilder
    • getCacheTokensDetails

      public ModalityTokenCount getCacheTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetails in interface UsageMetadataOrBuilder
    • setCacheTokensDetails

      public UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCacheTokensDetails

      public UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public UsageMetadata.Builder addCacheTokensDetails(ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public UsageMetadata.Builder addCacheTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllCacheTokensDetails

      public UsageMetadata.Builder addAllCacheTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCacheTokensDetails

      public UsageMetadata.Builder clearCacheTokensDetails()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeCacheTokensDetails

      public UsageMetadata.Builder removeCacheTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsBuilder

      public ModalityTokenCount.Builder getCacheTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsOrBuilder in interface UsageMetadataOrBuilder
    • getCacheTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getCacheTokensDetailsOrBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsOrBuilderList in interface UsageMetadataOrBuilder
    • addCacheTokensDetailsBuilder

      public ModalityTokenCount.Builder addCacheTokensDetailsBuilder()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetailsBuilder

      public ModalityTokenCount.Builder addCacheTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getCacheTokensDetailsBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the cached content.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsList

      public List<ModalityTokenCount> getCandidatesTokensDetailsList()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsList in interface UsageMetadataOrBuilder
    • getCandidatesTokensDetailsCount

      public int getCandidatesTokensDetailsCount()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsCount in interface UsageMetadataOrBuilder
    • getCandidatesTokensDetails

      public ModalityTokenCount getCandidatesTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetails in interface UsageMetadataOrBuilder
    • setCandidatesTokensDetails

      public UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCandidatesTokensDetails

      public UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount value)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllCandidatesTokensDetails

      public UsageMetadata.Builder addAllCandidatesTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCandidatesTokensDetails

      public UsageMetadata.Builder clearCandidatesTokensDetails()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeCandidatesTokensDetails

      public UsageMetadata.Builder removeCandidatesTokensDetails(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsBuilder

      public ModalityTokenCount.Builder getCandidatesTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getCandidatesTokensDetailsOrBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsOrBuilder in interface UsageMetadataOrBuilder
    • getCandidatesTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getCandidatesTokensDetailsOrBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsOrBuilderList in interface UsageMetadataOrBuilder
    • addCandidatesTokensDetailsBuilder

      public ModalityTokenCount.Builder addCandidatesTokensDetailsBuilder()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetailsBuilder

      public ModalityTokenCount.Builder addCandidatesTokensDetailsBuilder(int index)
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getCandidatesTokensDetailsBuilderList()
       Output only. A detailed breakdown of the token count for each modality in
       the generated candidates.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getToolUsePromptTokensDetailsList

      public List<ModalityTokenCount> getToolUsePromptTokensDetailsList()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokensDetailsList in interface UsageMetadataOrBuilder
    • getToolUsePromptTokensDetailsCount

      public int getToolUsePromptTokensDetailsCount()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokensDetailsCount in interface UsageMetadataOrBuilder
    • getToolUsePromptTokensDetails

      public ModalityTokenCount getToolUsePromptTokensDetails(int index)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokensDetails in interface UsageMetadataOrBuilder
    • setToolUsePromptTokensDetails

      public UsageMetadata.Builder setToolUsePromptTokensDetails(int index, ModalityTokenCount value)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setToolUsePromptTokensDetails

      public UsageMetadata.Builder setToolUsePromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addToolUsePromptTokensDetails

      public UsageMetadata.Builder addToolUsePromptTokensDetails(ModalityTokenCount value)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addToolUsePromptTokensDetails

      public UsageMetadata.Builder addToolUsePromptTokensDetails(int index, ModalityTokenCount value)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addToolUsePromptTokensDetails

      public UsageMetadata.Builder addToolUsePromptTokensDetails(ModalityTokenCount.Builder builderForValue)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addToolUsePromptTokensDetails

      public UsageMetadata.Builder addToolUsePromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllToolUsePromptTokensDetails

      public UsageMetadata.Builder addAllToolUsePromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearToolUsePromptTokensDetails

      public UsageMetadata.Builder clearToolUsePromptTokensDetails()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeToolUsePromptTokensDetails

      public UsageMetadata.Builder removeToolUsePromptTokensDetails(int index)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getToolUsePromptTokensDetailsBuilder

      public ModalityTokenCount.Builder getToolUsePromptTokensDetailsBuilder(int index)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getToolUsePromptTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getToolUsePromptTokensDetailsOrBuilder(int index)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokensDetailsOrBuilder in interface UsageMetadataOrBuilder
    • getToolUsePromptTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getToolUsePromptTokensDetailsOrBuilderList()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getToolUsePromptTokensDetailsOrBuilderList in interface UsageMetadataOrBuilder
    • addToolUsePromptTokensDetailsBuilder

      public ModalityTokenCount.Builder addToolUsePromptTokensDetailsBuilder()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addToolUsePromptTokensDetailsBuilder

      public ModalityTokenCount.Builder addToolUsePromptTokensDetailsBuilder(int index)
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getToolUsePromptTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getToolUsePromptTokensDetailsBuilderList()
       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.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getTrafficTypeValue

      public int getTrafficTypeValue()
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTrafficTypeValue in interface UsageMetadataOrBuilder
      Returns:
      The enum numeric value on the wire for trafficType.
    • setTrafficTypeValue

      public UsageMetadata.Builder setTrafficTypeValue(int value)
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for trafficType to set.
      Returns:
      This builder for chaining.
    • getTrafficType

      public UsageMetadata.TrafficType getTrafficType()
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTrafficType in interface UsageMetadataOrBuilder
      Returns:
      The trafficType.
    • setTrafficType

      public UsageMetadata.Builder setTrafficType(UsageMetadata.TrafficType value)
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The trafficType to set.
      Returns:
      This builder for chaining.
    • clearTrafficType

      public UsageMetadata.Builder clearTrafficType()
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.