Class ComputeTokensResponse.Builder (3.34.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1.TokensInfo>
Returns
TypeDescription
ComputeTokensResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTokensInfo
Returns
TypeDescription
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
NameDescription
builderForValueTokensInfo.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueTokensInfo
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTokensInfo.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
TokensInfo.Builder

build()

public ComputeTokensResponse build()
Returns
TypeDescription
ComputeTokensResponse

buildPartial()

public ComputeTokensResponse buildPartial()
Returns
TypeDescription
ComputeTokensResponse

clear()

public ComputeTokensResponse.Builder clear()
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ComputeTokensResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ComputeTokensResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
ComputeTokensResponse.Builder

clone()

public ComputeTokensResponse.Builder clone()
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides

getDefaultInstanceForType()

public ComputeTokensResponse getDefaultInstanceForType()
Returns
TypeDescription
ComputeTokensResponse

getDescriptorForType()

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

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ComputeTokensResponse other)

public ComputeTokensResponse.Builder mergeFrom(ComputeTokensResponse other)
Parameter
NameDescription
otherComputeTokensResponse
Returns
TypeDescription
ComputeTokensResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ComputeTokensResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ComputeTokensResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ComputeTokensResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides

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

public ComputeTokensResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueTokensInfo
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTokensInfo.Builder
Returns
TypeDescription
ComputeTokensResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ComputeTokensResponse.Builder
Overrides