Class TokensInfo (3.38.0)

public final class TokensInfo extends GeneratedMessageV3 implements TokensInfoOrBuilder

Tokens info with a list of tokens and the corresponding list of token ids.

Protobuf type google.cloud.aiplatform.v1.TokensInfo

Implements

TokensInfoOrBuilder

Static Fields

TOKENS_FIELD_NUMBER

public static final int TOKENS_FIELD_NUMBER
Field Value
TypeDescription
int

TOKEN_IDS_FIELD_NUMBER

public static final int TOKEN_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TokensInfo getDefaultInstance()
Returns
TypeDescription
TokensInfo

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static TokensInfo.Builder newBuilder()
Returns
TypeDescription
TokensInfo.Builder

newBuilder(TokensInfo prototype)

public static TokensInfo.Builder newBuilder(TokensInfo prototype)
Parameter
NameDescription
prototypeTokensInfo
Returns
TypeDescription
TokensInfo.Builder

parseDelimitedFrom(InputStream input)

public static TokensInfo parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TokensInfo parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TokensInfo parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TokensInfo parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TokensInfo parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TokensInfo parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TokensInfo parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TokensInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TokensInfo> parser()
Returns
TypeDescription
Parser<TokensInfo>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public TokensInfo getDefaultInstanceForType()
Returns
TypeDescription
TokensInfo

getParserForType()

public Parser<TokensInfo> getParserForType()
Returns
TypeDescription
Parser<TokensInfo>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTokenIds(int index)

public long getTokenIds(int index)

A list of token ids from the input.

repeated int64 token_ids = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The tokenIds at the given index.

getTokenIdsCount()

public int getTokenIdsCount()

A list of token ids from the input.

repeated int64 token_ids = 2;

Returns
TypeDescription
int

The count of tokenIds.

getTokenIdsList()

public List<Long> getTokenIdsList()

A list of token ids from the input.

repeated int64 token_ids = 2;

Returns
TypeDescription
List<Long>

A list containing the tokenIds.

getTokens(int index)

public ByteString getTokens(int index)

A list of tokens from the input.

repeated bytes tokens = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
ByteString

The tokens at the given index.

getTokensCount()

public int getTokensCount()

A list of tokens from the input.

repeated bytes tokens = 1;

Returns
TypeDescription
int

The count of tokens.

getTokensList()

public List<ByteString> getTokensList()

A list of tokens from the input.

repeated bytes tokens = 1;

Returns
TypeDescription
List<ByteString>

A list containing the tokens.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TokensInfo.Builder newBuilderForType()
Returns
TypeDescription
TokensInfo.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TokensInfo.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TokensInfo.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TokensInfo.Builder toBuilder()
Returns
TypeDescription
TokensInfo.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException