Class ComputeTokensResponse.Builder (3.52.0)

public static final class ComputeTokensResponse.Builder extends GeneratedMessageV3.Builder<ComputeTokensResponse.Builder> implements ComputeTokensResponseOrBuilder

Response message for ComputeTokens RPC call.

Protobuf type google.cloud.aiplatform.v1.ComputeTokensResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllTokensInfo(Iterable<? extends TokensInfo> values)

public ComputeTokensResponse.Builder addAllTokensInfo(Iterable<? extends TokensInfo> values)

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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1.TokensInfo>
Returns
Type Description
ComputeTokensResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

addTokensInfo(TokensInfo value)

public ComputeTokensResponse.Builder addTokensInfo(TokensInfo value)

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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
value TokensInfo
Returns
Type Description
ComputeTokensResponse.Builder

addTokensInfo(TokensInfo.Builder builderForValue)

public ComputeTokensResponse.Builder addTokensInfo(TokensInfo.Builder builderForValue)

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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
builderForValue TokensInfo.Builder
Returns
Type Description
ComputeTokensResponse.Builder

addTokensInfo(int index, TokensInfo value)

public ComputeTokensResponse.Builder addTokensInfo(int index, TokensInfo value)

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.v1.TokensInfo tokens_info = 1;

Parameters
Name Description
index int
value TokensInfo
Returns
Type Description
ComputeTokensResponse.Builder

addTokensInfo(int index, TokensInfo.Builder builderForValue)

public ComputeTokensResponse.Builder addTokensInfo(int index, TokensInfo.Builder builderForValue)

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.v1.TokensInfo tokens_info = 1;

Parameters
Name Description
index int
builderForValue TokensInfo.Builder
Returns
Type Description
ComputeTokensResponse.Builder

addTokensInfoBuilder()

public TokensInfo.Builder addTokensInfoBuilder()

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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
TokensInfo.Builder

addTokensInfoBuilder(int index)

public TokensInfo.Builder addTokensInfoBuilder(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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
index int
Returns
Type Description
TokensInfo.Builder

build()

public ComputeTokensResponse build()
Returns
Type Description
ComputeTokensResponse

buildPartial()

public ComputeTokensResponse buildPartial()
Returns
Type Description
ComputeTokensResponse

clear()

public ComputeTokensResponse.Builder clear()
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ComputeTokensResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ComputeTokensResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

clearTokensInfo()

public ComputeTokensResponse.Builder clearTokensInfo()

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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
ComputeTokensResponse.Builder

clone()

public ComputeTokensResponse.Builder clone()
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

getDefaultInstanceForType()

public ComputeTokensResponse getDefaultInstanceForType()
Returns
Type Description
ComputeTokensResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
index int
Returns
Type Description
TokensInfo

getTokensInfoBuilder(int index)

public TokensInfo.Builder getTokensInfoBuilder(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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
index int
Returns
Type Description
TokensInfo.Builder

getTokensInfoBuilderList()

public List<TokensInfo.Builder> getTokensInfoBuilderList()

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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
List<Builder>

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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
index int
Returns
Type Description
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.v1.TokensInfo tokens_info = 1;

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1.TokensInfoOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ComputeTokensResponse other)

public ComputeTokensResponse.Builder mergeFrom(ComputeTokensResponse other)
Parameter
Name Description
other ComputeTokensResponse
Returns
Type Description
ComputeTokensResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ComputeTokensResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ComputeTokensResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ComputeTokensResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

removeTokensInfo(int index)

public ComputeTokensResponse.Builder removeTokensInfo(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.v1.TokensInfo tokens_info = 1;

Parameter
Name Description
index int
Returns
Type Description
ComputeTokensResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ComputeTokensResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ComputeTokensResponse.Builder
Overrides

setTokensInfo(int index, TokensInfo value)

public ComputeTokensResponse.Builder setTokensInfo(int index, TokensInfo value)

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.v1.TokensInfo tokens_info = 1;

Parameters
Name Description
index int
value TokensInfo
Returns
Type Description
ComputeTokensResponse.Builder

setTokensInfo(int index, TokensInfo.Builder builderForValue)

public ComputeTokensResponse.Builder setTokensInfo(int index, TokensInfo.Builder builderForValue)

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.v1.TokensInfo tokens_info = 1;

Parameters
Name Description
index int
builderForValue TokensInfo.Builder
Returns
Type Description
ComputeTokensResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ComputeTokensResponse.Builder
Overrides