Package com.google.cloud.aiplatform.v1
Class CountTokensResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
com.google.cloud.aiplatform.v1.CountTokensResponse.Builder
- All Implemented Interfaces:
CountTokensResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CountTokensResponse
public static final class CountTokensResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
implements CountTokensResponseOrBuilder
Response message for [PredictionService.CountTokens][].Protobuf type
google.cloud.aiplatform.v1.CountTokensResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values) Output only.addPromptTokensDetails(int index, ModalityTokenCount value) Output only.addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue) Output only.Output only.addPromptTokensDetails(ModalityTokenCount.Builder builderForValue) Output only.Output only.addPromptTokensDetailsBuilder(int index) Output only.build()clear()Output only.The total number of billable characters counted across all instances from the request.The total number of tokens counted across all instances from the request.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetPromptTokensDetails(int index) Output only.getPromptTokensDetailsBuilder(int index) Output only.Output only.intOutput only.Output only.getPromptTokensDetailsOrBuilder(int index) Output only.List<? extends ModalityTokenCountOrBuilder>Output only.intThe total number of billable characters counted across all instances from the request.intThe total number of tokens counted across all instances from the request.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(CountTokensResponse other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removePromptTokensDetails(int index) Output only.setPromptTokensDetails(int index, ModalityTokenCount value) Output only.setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue) Output only.setTotalBillableCharacters(int value) The total number of billable characters counted across all instances from the request.setTotalTokens(int value) The total number of tokens counted across all instances from the request.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CountTokensResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CountTokensResponse.Builder>
-
mergeFrom
public CountTokensResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CountTokensResponse.Builder>- Throws:
IOException
-
getTotalTokens
public int getTotalTokens()The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;- Specified by:
getTotalTokensin interfaceCountTokensResponseOrBuilder- Returns:
- The totalTokens.
-
setTotalTokens
The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;- Parameters:
value- The totalTokens to set.- Returns:
- This builder for chaining.
-
clearTotalTokens
The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;- Returns:
- This builder for chaining.
-
getTotalBillableCharacters
public int getTotalBillableCharacters()The total number of billable characters counted across all instances from the request.
int32 total_billable_characters = 2;- Specified by:
getTotalBillableCharactersin interfaceCountTokensResponseOrBuilder- Returns:
- The totalBillableCharacters.
-
setTotalBillableCharacters
The total number of billable characters counted across all instances from the request.
int32 total_billable_characters = 2;- Parameters:
value- The totalBillableCharacters to set.- Returns:
- This builder for chaining.
-
clearTotalBillableCharacters
The total number of billable characters counted across all instances from the request.
int32 total_billable_characters = 2;- Returns:
- This builder for chaining.
-
getPromptTokensDetailsList
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptTokensDetailsListin interfaceCountTokensResponseOrBuilder
-
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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptTokensDetailsCountin interfaceCountTokensResponseOrBuilder
-
getPromptTokensDetails
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptTokensDetailsin interfaceCountTokensResponseOrBuilder
-
setPromptTokensDetails
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setPromptTokensDetails
public CountTokensResponse.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 = 3 [(.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 = 3 [(.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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addPromptTokensDetails
public CountTokensResponse.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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addPromptTokensDetails
public CountTokensResponse.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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addAllPromptTokensDetails
public CountTokensResponse.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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearPromptTokensDetails
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
removePromptTokensDetails
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getPromptTokensDetailsBuilder
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getPromptTokensDetailsOrBuilder
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptTokensDetailsOrBuilderin interfaceCountTokensResponseOrBuilder
-
getPromptTokensDetailsOrBuilderList
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptTokensDetailsOrBuilderListin interfaceCountTokensResponseOrBuilder
-
addPromptTokensDetailsBuilder
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addPromptTokensDetailsBuilder
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getPromptTokensDetailsBuilderList
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-