Class GenerateContentResponse.UsageMetadata.Builder

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

public static final class GenerateContentResponse.UsageMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.UsageMetadata.Builder> implements GenerateContentResponse.UsageMetadataOrBuilder
 Usage metadata about response(s).
 
Protobuf type google.cloud.aiplatform.v1.GenerateContentResponse.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<GenerateContentResponse.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<GenerateContentResponse.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<GenerateContentResponse.UsageMetadata.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public GenerateContentResponse.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<GenerateContentResponse.UsageMetadata.Builder>
    • mergeFrom

    • isInitialized

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

      public GenerateContentResponse.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<GenerateContentResponse.UsageMetadata.Builder>
      Throws:
      IOException
    • getPromptTokenCount

      public int getPromptTokenCount()
       Number of tokens in the request. When `cached_content` is set, this is
       still the total effective prompt size meaning this includes the number of
       tokens in the cached content.
       
      int32 prompt_token_count = 1;
      Specified by:
      getPromptTokenCount in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The promptTokenCount.
    • setPromptTokenCount

      public GenerateContentResponse.UsageMetadata.Builder setPromptTokenCount(int value)
       Number of tokens in the request. When `cached_content` is set, this is
       still the total effective prompt size meaning this 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 GenerateContentResponse.UsageMetadata.Builder clearPromptTokenCount()
       Number of tokens in the request. When `cached_content` is set, this is
       still the total effective prompt size meaning this includes the number of
       tokens in the cached content.
       
      int32 prompt_token_count = 1;
      Returns:
      This builder for chaining.
    • getCandidatesTokenCount

      public int getCandidatesTokenCount()
       Number of tokens in the response(s).
       
      int32 candidates_token_count = 2;
      Specified by:
      getCandidatesTokenCount in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The candidatesTokenCount.
    • setCandidatesTokenCount

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

      public GenerateContentResponse.UsageMetadata.Builder clearCandidatesTokenCount()
       Number of tokens in the response(s).
       
      int32 candidates_token_count = 2;
      Returns:
      This builder for chaining.
    • getThoughtsTokenCount

      public int getThoughtsTokenCount()
       Output only. Number of tokens present in thoughts output.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getThoughtsTokenCount in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The thoughtsTokenCount.
    • setThoughtsTokenCount

      public GenerateContentResponse.UsageMetadata.Builder setThoughtsTokenCount(int value)
       Output only. Number of tokens present in thoughts output.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The thoughtsTokenCount to set.
      Returns:
      This builder for chaining.
    • clearThoughtsTokenCount

      public GenerateContentResponse.UsageMetadata.Builder clearThoughtsTokenCount()
       Output only. Number of tokens present in thoughts output.
       
      int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getTotalTokenCount

      public int getTotalTokenCount()
       Total token count for prompt and response candidates.
       
      int32 total_token_count = 3;
      Specified by:
      getTotalTokenCount in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The totalTokenCount.
    • setTotalTokenCount

      public GenerateContentResponse.UsageMetadata.Builder setTotalTokenCount(int value)
       Total token count for prompt and response candidates.
       
      int32 total_token_count = 3;
      Parameters:
      value - The totalTokenCount to set.
      Returns:
      This builder for chaining.
    • clearTotalTokenCount

      public GenerateContentResponse.UsageMetadata.Builder clearTotalTokenCount()
       Total token count for prompt and response candidates.
       
      int32 total_token_count = 3;
      Returns:
      This builder for chaining.
    • getCachedContentTokenCount

      public int getCachedContentTokenCount()
       Output only. Number of tokens in the cached part in the input (the cached
       content).
       
      int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCachedContentTokenCount in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The cachedContentTokenCount.
    • setCachedContentTokenCount

      public GenerateContentResponse.UsageMetadata.Builder setCachedContentTokenCount(int value)
       Output only. Number of tokens in the cached part in the input (the cached
       content).
       
      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 GenerateContentResponse.UsageMetadata.Builder clearCachedContentTokenCount()
       Output only. Number of tokens in the cached part in the input (the cached
       content).
       
      int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getPromptTokensDetailsList

      public List<ModalityTokenCount> getPromptTokensDetailsList()
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getPromptTokensDetailsCount

      public int getPromptTokensDetailsCount()
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsCount in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getPromptTokensDetails

      public ModalityTokenCount getPromptTokensDetails(int index)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetails in interface GenerateContentResponse.UsageMetadataOrBuilder
    • setPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearPromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder clearPromptTokensDetails()
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removePromptTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder removePromptTokensDetails(int index)
       Output only. List of modalities that were processed in the request input.
       
      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. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPromptTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder(int index)
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsOrBuilder in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getPromptTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getPromptTokensDetailsOrBuilderList()
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPromptTokensDetailsOrBuilderList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • addPromptTokensDetailsBuilder

      public ModalityTokenCount.Builder addPromptTokensDetailsBuilder()
       Output only. List of modalities that were processed in the request input.
       
      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. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPromptTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getPromptTokensDetailsBuilderList()
       Output only. List of modalities that were processed in the request input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsList

      public List<ModalityTokenCount> getCacheTokensDetailsList()
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCacheTokensDetailsCount

      public int getCacheTokensDetailsCount()
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsCount in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCacheTokensDetails

      public ModalityTokenCount getCacheTokensDetails(int index)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetails in interface GenerateContentResponse.UsageMetadataOrBuilder
    • setCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addAllCacheTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder clearCacheTokensDetails()
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeCacheTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder removeCacheTokensDetails(int index)
       Output only. List of modalities of the cached content in the request
       input.
       
      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. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder(int index)
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsOrBuilder in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCacheTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getCacheTokensDetailsOrBuilderList()
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCacheTokensDetailsOrBuilderList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • addCacheTokensDetailsBuilder

      public ModalityTokenCount.Builder addCacheTokensDetailsBuilder()
       Output only. List of modalities of the cached content in the request
       input.
       
      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. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCacheTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getCacheTokensDetailsBuilderList()
       Output only. List of modalities of the cached content in the request
       input.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsList

      public List<ModalityTokenCount> getCandidatesTokensDetailsList()
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCandidatesTokensDetailsCount

      public int getCandidatesTokensDetailsCount()
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsCount in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCandidatesTokensDetails

      public ModalityTokenCount getCandidatesTokensDetails(int index)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetails in interface GenerateContentResponse.UsageMetadataOrBuilder
    • setCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount value)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount value)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder addAllCandidatesTokensDetails(Iterable<? extends ModalityTokenCount> values)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder clearCandidatesTokensDetails()
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeCandidatesTokensDetails

      public GenerateContentResponse.UsageMetadata.Builder removeCandidatesTokensDetails(int index)
       Output only. List of modalities that were returned in the response.
       
      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. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsOrBuilder

      public ModalityTokenCountOrBuilder getCandidatesTokensDetailsOrBuilder(int index)
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsOrBuilder in interface GenerateContentResponse.UsageMetadataOrBuilder
    • getCandidatesTokensDetailsOrBuilderList

      public List<? extends ModalityTokenCountOrBuilder> getCandidatesTokensDetailsOrBuilderList()
       Output only. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesTokensDetailsOrBuilderList in interface GenerateContentResponse.UsageMetadataOrBuilder
    • addCandidatesTokensDetailsBuilder

      public ModalityTokenCount.Builder addCandidatesTokensDetailsBuilder()
       Output only. List of modalities that were returned in the response.
       
      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. List of modalities that were returned in the response.
       
      repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCandidatesTokensDetailsBuilderList

      public List<ModalityTokenCount.Builder> getCandidatesTokensDetailsBuilderList()
       Output only. List of modalities that were returned in the response.
       
      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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.UsageMetadataOrBuilder
    • setToolUsePromptTokensDetails

      public GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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 GenerateContentResponse.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.GenerateContentResponse.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTrafficTypeValue in interface GenerateContentResponse.UsageMetadataOrBuilder
      Returns:
      The enum numeric value on the wire for trafficType.
    • setTrafficTypeValue

      public GenerateContentResponse.UsageMetadata.Builder setTrafficTypeValue(int value)
       Output only. The traffic type for this request.
       
      .google.cloud.aiplatform.v1.GenerateContentResponse.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

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

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

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