Class ComputeTokensResponse (3.35.0)

public final class ComputeTokensResponse extends GeneratedMessageV3 implements ComputeTokensResponseOrBuilder

Response message for ComputeTokens RPC call.

Protobuf type google.cloud.aiplatform.v1beta1.ComputeTokensResponse

Static Fields

TOKENS_INFO_FIELD_NUMBER

public static final int TOKENS_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ComputeTokensResponse getDefaultInstance()
Returns
TypeDescription
ComputeTokensResponse

getDescriptor()

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

newBuilder()

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

newBuilder(ComputeTokensResponse prototype)

public static ComputeTokensResponse.Builder newBuilder(ComputeTokensResponse prototype)
Parameter
NameDescription
prototypeComputeTokensResponse
Returns
TypeDescription
ComputeTokensResponse.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public ComputeTokensResponse getDefaultInstanceForType()
Returns
TypeDescription
ComputeTokensResponse

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTokensInfo(int index)

public TokensInfo getTokensInfo(int index)

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
TokensInfo

getTokensInfoCount()

public int getTokensInfoCount()

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1;

Returns
TypeDescription
int

getTokensInfoList()

public List<TokensInfo> getTokensInfoList()

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1;

Returns
TypeDescription
List<TokensInfo>

getTokensInfoOrBuilder(int index)

public TokensInfoOrBuilder getTokensInfoOrBuilder(int index)

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
TokensInfoOrBuilder

getTokensInfoOrBuilderList()

public List<? extends TokensInfoOrBuilder> getTokensInfoOrBuilderList()

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1;

Returns
TypeDescription
List<? extends com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder>

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 ComputeTokensResponse.Builder newBuilderForType()
Returns
TypeDescription
ComputeTokensResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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