public static final class GenerateContentResponse.UsageMetadata.Builder extends GeneratedMessageV3.Builder<GenerateContentResponse.UsageMetadata.Builder> implements GenerateContentResponse.UsageMetadataOrBuilder
Usage metadata about response(s).
Protobuf type google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata
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
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.UsageMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public GenerateContentResponse.UsageMetadata build()
buildPartial()
public GenerateContentResponse.UsageMetadata buildPartial()
clear()
public GenerateContentResponse.UsageMetadata.Builder clear()
Overrides
clearCandidatesTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
clearField(Descriptors.FieldDescriptor field)
public GenerateContentResponse.UsageMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerateContentResponse.UsageMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPromptTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearPromptTokenCount()
Number of tokens in the request.
int32 prompt_token_count = 1;
clearTotalTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearTotalTokenCount()
int32 total_token_count = 3;
clone()
public GenerateContentResponse.UsageMetadata.Builder clone()
Overrides
getCandidatesTokenCount()
public int getCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
Returns |
---|
Type | Description |
int | The candidatesTokenCount.
|
getDefaultInstanceForType()
public GenerateContentResponse.UsageMetadata getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getPromptTokenCount()
public int getPromptTokenCount()
Number of tokens in the request.
int32 prompt_token_count = 1;
Returns |
---|
Type | Description |
int | The promptTokenCount.
|
getTotalTokenCount()
public int getTotalTokenCount()
int32 total_token_count = 3;
Returns |
---|
Type | Description |
int | The totalTokenCount.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(GenerateContentResponse.UsageMetadata other)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(GenerateContentResponse.UsageMetadata other)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.UsageMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setCandidatesTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setCandidatesTokenCount(int value)
Number of tokens in the response(s).
int32 candidates_token_count = 2;
Parameter |
---|
Name | Description |
value | int
The candidatesTokenCount to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.UsageMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setPromptTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setPromptTokenCount(int value)
Number of tokens in the request.
int32 prompt_token_count = 1;
Parameter |
---|
Name | Description |
value | int
The promptTokenCount to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerateContentResponse.UsageMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setTotalTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setTotalTokenCount(int value)
int32 total_token_count = 3;
Parameter |
---|
Name | Description |
value | int
The totalTokenCount to set.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.UsageMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides