public static final class CountTokensResponse.Builder extends GeneratedMessageV3.Builder<CountTokensResponse.Builder> implements CountTokensResponseOrBuilder
Response message for [PredictionService.CountTokens][].
Protobuf type google.cloud.aiplatform.v1.CountTokensResponse
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Methods
public CountTokensResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public CountTokensResponse build()
public CountTokensResponse buildPartial()
public CountTokensResponse.Builder clear()
Overrides
public CountTokensResponse.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
public CountTokensResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
public CountTokensResponse.Builder clearTotalBillableCharacters()
The total number of billable characters counted across all instances from
the request.
int32 total_billable_characters = 2;
public CountTokensResponse.Builder clearTotalTokens()
The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
public CountTokensResponse.Builder clone()
Overrides
public CountTokensResponse getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
public int getTotalBillableCharacters()
The total number of billable characters counted across all instances from
the request.
int32 total_billable_characters = 2;
Returns |
---|
Type | Description |
int | The totalBillableCharacters.
|
public int getTotalTokens()
The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
Returns |
---|
Type | Description |
int | The totalTokens.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public CountTokensResponse.Builder mergeFrom(CountTokensResponse other)
public CountTokensResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public CountTokensResponse.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
public final CountTokensResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
public CountTokensResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public CountTokensResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public CountTokensResponse.Builder setTotalBillableCharacters(int value)
The total number of billable characters counted across all instances from
the request.
int32 total_billable_characters = 2;
Parameter |
---|
Name | Description |
value | int
The totalBillableCharacters to set.
|
public CountTokensResponse.Builder setTotalTokens(int value)
The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
Parameter |
---|
Name | Description |
value | int
The totalTokens to set.
|
public final CountTokensResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides