public static final class TokensInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<TokensInfo.Builder> implements TokensInfoOrBuilder
Tokens info with a list of tokens and the corresponding list of token ids.Protobuf type
google.cloud.aiplatform.v1.TokensInfo| Modifier and Type | Method and Description |
|---|---|
TokensInfo.Builder |
addAllTokenIds(Iterable<? extends Long> values)
A list of token ids from the input.
|
TokensInfo.Builder |
addAllTokens(Iterable<? extends com.google.protobuf.ByteString> values)
A list of tokens from the input.
|
TokensInfo.Builder |
addTokenIds(long value)
A list of token ids from the input.
|
TokensInfo.Builder |
addTokens(com.google.protobuf.ByteString value)
A list of tokens from the input.
|
TokensInfo |
build() |
TokensInfo |
buildPartial() |
TokensInfo.Builder |
clear() |
TokensInfo.Builder |
clearRole()
Optional.
|
TokensInfo.Builder |
clearTokenIds()
A list of token ids from the input.
|
TokensInfo.Builder |
clearTokens()
A list of tokens from the input.
|
TokensInfo |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getRole()
Optional.
|
com.google.protobuf.ByteString |
getRoleBytes()
Optional.
|
long |
getTokenIds(int index)
A list of token ids from the input.
|
int |
getTokenIdsCount()
A list of token ids from the input.
|
List<Long> |
getTokenIdsList()
A list of token ids from the input.
|
com.google.protobuf.ByteString |
getTokens(int index)
A list of tokens from the input.
|
int |
getTokensCount()
A list of tokens from the input.
|
List<com.google.protobuf.ByteString> |
getTokensList()
A list of tokens from the input.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TokensInfo.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
TokensInfo.Builder |
mergeFrom(com.google.protobuf.Message other) |
TokensInfo.Builder |
mergeFrom(TokensInfo other) |
TokensInfo.Builder |
setRole(String value)
Optional.
|
TokensInfo.Builder |
setRoleBytes(com.google.protobuf.ByteString value)
Optional.
|
TokensInfo.Builder |
setTokenIds(int index,
long value)
A list of token ids from the input.
|
TokensInfo.Builder |
setTokens(int index,
com.google.protobuf.ByteString value)
A list of tokens from the input.
|
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<TokensInfo.Builder>public TokensInfo.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<TokensInfo.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<TokensInfo.Builder>public TokensInfo getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TokensInfo build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TokensInfo buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TokensInfo.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TokensInfo.Builder>public TokensInfo.Builder mergeFrom(TokensInfo other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<TokensInfo.Builder>public TokensInfo.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<TokensInfo.Builder>IOExceptionpublic List<com.google.protobuf.ByteString> getTokensList()
A list of tokens from the input.
repeated bytes tokens = 1;getTokensList in interface TokensInfoOrBuilderpublic int getTokensCount()
A list of tokens from the input.
repeated bytes tokens = 1;getTokensCount in interface TokensInfoOrBuilderpublic com.google.protobuf.ByteString getTokens(int index)
A list of tokens from the input.
repeated bytes tokens = 1;getTokens in interface TokensInfoOrBuilderindex - The index of the element to return.public TokensInfo.Builder setTokens(int index, com.google.protobuf.ByteString value)
A list of tokens from the input.
repeated bytes tokens = 1;index - The index to set the value at.value - The tokens to set.public TokensInfo.Builder addTokens(com.google.protobuf.ByteString value)
A list of tokens from the input.
repeated bytes tokens = 1;value - The tokens to add.public TokensInfo.Builder addAllTokens(Iterable<? extends com.google.protobuf.ByteString> values)
A list of tokens from the input.
repeated bytes tokens = 1;values - The tokens to add.public TokensInfo.Builder clearTokens()
A list of tokens from the input.
repeated bytes tokens = 1;public List<Long> getTokenIdsList()
A list of token ids from the input.
repeated int64 token_ids = 2;getTokenIdsList in interface TokensInfoOrBuilderpublic int getTokenIdsCount()
A list of token ids from the input.
repeated int64 token_ids = 2;getTokenIdsCount in interface TokensInfoOrBuilderpublic long getTokenIds(int index)
A list of token ids from the input.
repeated int64 token_ids = 2;getTokenIds in interface TokensInfoOrBuilderindex - The index of the element to return.public TokensInfo.Builder setTokenIds(int index, long value)
A list of token ids from the input.
repeated int64 token_ids = 2;index - The index to set the value at.value - The tokenIds to set.public TokensInfo.Builder addTokenIds(long value)
A list of token ids from the input.
repeated int64 token_ids = 2;value - The tokenIds to add.public TokensInfo.Builder addAllTokenIds(Iterable<? extends Long> values)
A list of token ids from the input.
repeated int64 token_ids = 2;values - The tokenIds to add.public TokensInfo.Builder clearTokenIds()
A list of token ids from the input.
repeated int64 token_ids = 2;public String getRole()
Optional. Optional fields for the role from the corresponding Content.
string role = 3 [(.google.api.field_behavior) = OPTIONAL];getRole in interface TokensInfoOrBuilderpublic com.google.protobuf.ByteString getRoleBytes()
Optional. Optional fields for the role from the corresponding Content.
string role = 3 [(.google.api.field_behavior) = OPTIONAL];getRoleBytes in interface TokensInfoOrBuilderpublic TokensInfo.Builder setRole(String value)
Optional. Optional fields for the role from the corresponding Content.
string role = 3 [(.google.api.field_behavior) = OPTIONAL];value - The role to set.public TokensInfo.Builder clearRole()
Optional. Optional fields for the role from the corresponding Content.
string role = 3 [(.google.api.field_behavior) = OPTIONAL];public TokensInfo.Builder setRoleBytes(com.google.protobuf.ByteString value)
Optional. Optional fields for the role from the corresponding Content.
string role = 3 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for role to set.Copyright © 2026 Google LLC. All rights reserved.