public static final class ModalityTokenCount.Builder extends com.google.protobuf.GeneratedMessage.Builder<ModalityTokenCount.Builder> implements ModalityTokenCountOrBuilder
Represents token counting info for a single modality.Protobuf type
google.cloud.aiplatform.v1.ModalityTokenCount| Modifier and Type | Method and Description |
|---|---|
ModalityTokenCount |
build() |
ModalityTokenCount |
buildPartial() |
ModalityTokenCount.Builder |
clear() |
ModalityTokenCount.Builder |
clearModality()
The modality associated with this token count.
|
ModalityTokenCount.Builder |
clearTokenCount()
Number of tokens.
|
ModalityTokenCount |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Modality |
getModality()
The modality associated with this token count.
|
int |
getModalityValue()
The modality associated with this token count.
|
int |
getTokenCount()
Number of tokens.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ModalityTokenCount.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ModalityTokenCount.Builder |
mergeFrom(com.google.protobuf.Message other) |
ModalityTokenCount.Builder |
mergeFrom(ModalityTokenCount other) |
ModalityTokenCount.Builder |
setModality(Modality value)
The modality associated with this token count.
|
ModalityTokenCount.Builder |
setModalityValue(int value)
The modality associated with this token count.
|
ModalityTokenCount.Builder |
setTokenCount(int value)
Number of tokens.
|
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, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ModalityTokenCount.Builder>public ModalityTokenCount.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<ModalityTokenCount.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ModalityTokenCount.Builder>public ModalityTokenCount getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ModalityTokenCount build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ModalityTokenCount buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ModalityTokenCount.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ModalityTokenCount.Builder>public ModalityTokenCount.Builder mergeFrom(ModalityTokenCount other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<ModalityTokenCount.Builder>public ModalityTokenCount.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ModalityTokenCount.Builder>IOExceptionpublic int getModalityValue()
The modality associated with this token count.
.google.cloud.aiplatform.v1.Modality modality = 1;getModalityValue in interface ModalityTokenCountOrBuilderpublic ModalityTokenCount.Builder setModalityValue(int value)
The modality associated with this token count.
.google.cloud.aiplatform.v1.Modality modality = 1;value - The enum numeric value on the wire for modality to set.public Modality getModality()
The modality associated with this token count.
.google.cloud.aiplatform.v1.Modality modality = 1;getModality in interface ModalityTokenCountOrBuilderpublic ModalityTokenCount.Builder setModality(Modality value)
The modality associated with this token count.
.google.cloud.aiplatform.v1.Modality modality = 1;value - The modality to set.public ModalityTokenCount.Builder clearModality()
The modality associated with this token count.
.google.cloud.aiplatform.v1.Modality modality = 1;public int getTokenCount()
Number of tokens.
int32 token_count = 2;getTokenCount in interface ModalityTokenCountOrBuilderpublic ModalityTokenCount.Builder setTokenCount(int value)
Number of tokens.
int32 token_count = 2;value - The tokenCount to set.public ModalityTokenCount.Builder clearTokenCount()
Number of tokens.
int32 token_count = 2;Copyright © 2026 Google LLC. All rights reserved.