publicstaticfinalclass GenerateContentResponse.UsageMetadata.BuilderextendsGeneratedMessageV3.Builder<GenerateContentResponse.UsageMetadata.Builder>implementsGenerateContentResponse.UsageMetadataOrBuilder
Usage metadata about response(s).
Protobuf type google.cloud.vertexai.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()
publicstaticfinalDescriptors.DescriptorgetDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicGenerateContentResponse.UsageMetadata.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Overrides
build()
publicGenerateContentResponse.UsageMetadatabuild()
buildPartial()
publicGenerateContentResponse.UsageMetadatabuildPartial()
clear()
publicGenerateContentResponse.UsageMetadata.Builderclear()
Overrides
clearCandidatesTokenCount()
publicGenerateContentResponse.UsageMetadata.BuilderclearCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
clearField(Descriptors.FieldDescriptor field)
publicGenerateContentResponse.UsageMetadata.BuilderclearField(Descriptors.FieldDescriptorfield)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
publicGenerateContentResponse.UsageMetadata.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Overrides
clearPromptTokenCount()
publicGenerateContentResponse.UsageMetadata.BuilderclearPromptTokenCount()
Number of tokens in the request. When cached_content is set, this is
still the total effective prompt size meaning this includes the number of
tokens in the cached content.
int32 prompt_token_count = 1;
clearTotalTokenCount()
publicGenerateContentResponse.UsageMetadata.BuilderclearTotalTokenCount()
int32 total_token_count = 3;
clone()
publicGenerateContentResponse.UsageMetadata.Builderclone()
Overrides
getCandidatesTokenCount()
publicintgetCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
| Returns |
| Type |
Description |
int |
The candidatesTokenCount.
|
getDefaultInstanceForType()
publicGenerateContentResponse.UsageMetadatagetDefaultInstanceForType()
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()
Overrides
getPromptTokenCount()
publicintgetPromptTokenCount()
Number of tokens in the request. When cached_content is set, this is
still the total effective prompt size meaning this includes the number of
tokens in the cached content.
int32 prompt_token_count = 1;
| Returns |
| Type |
Description |
int |
The promptTokenCount.
|
getTotalTokenCount()
publicintgetTotalTokenCount()
int32 total_token_count = 3;
| Returns |
| Type |
Description |
int |
The totalTokenCount.
|
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
isInitialized()
publicfinalbooleanisInitialized()
Overrides
mergeFrom(GenerateContentResponse.UsageMetadata other)
publicGenerateContentResponse.UsageMetadata.BuildermergeFrom(GenerateContentResponse.UsageMetadataother)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicGenerateContentResponse.UsageMetadata.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Overrides
mergeFrom(Message other)
publicGenerateContentResponse.UsageMetadata.BuildermergeFrom(Messageother)
| Parameter |
| Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalGenerateContentResponse.UsageMetadata.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Overrides
setCandidatesTokenCount(int value)
publicGenerateContentResponse.UsageMetadata.BuildersetCandidatesTokenCount(intvalue)
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)
publicGenerateContentResponse.UsageMetadata.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Overrides
setPromptTokenCount(int value)
publicGenerateContentResponse.UsageMetadata.BuildersetPromptTokenCount(intvalue)
Number of tokens in the request. When cached_content is set, this is
still the total effective prompt size meaning this includes the number of
tokens in the cached content.
int32 prompt_token_count = 1;
| Parameter |
| Name |
Description |
value |
int
The promptTokenCount to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicGenerateContentResponse.UsageMetadata.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Overrides
setTotalTokenCount(int value)
publicGenerateContentResponse.UsageMetadata.BuildersetTotalTokenCount(intvalue)
int32 total_token_count = 3;
| Parameter |
| Name |
Description |
value |
int
The totalTokenCount to set.
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalGenerateContentResponse.UsageMetadata.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Overrides