- 3.58.0 (latest)
- 3.57.0
- 3.56.0
- 3.55.0
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.3.0
- 3.2.0
- 3.0.0
- 2.9.8
- 2.8.9
- 2.7.4
- 2.5.3
- 2.4.0
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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerateContentResponse.UsageMetadata.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllCacheTokensDetails(Iterable<? extends ModalityTokenCount> values)
public GenerateContentResponse.UsageMetadata.Builder addAllCacheTokensDetails(Iterable<? extends ModalityTokenCount> values)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.cloud.aiplatform.v1.ModalityTokenCount> |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addAllCandidatesTokensDetails(Iterable<? extends ModalityTokenCount> values)
public GenerateContentResponse.UsageMetadata.Builder addAllCandidatesTokensDetails(Iterable<? extends ModalityTokenCount> values)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.cloud.aiplatform.v1.ModalityTokenCount> |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
public GenerateContentResponse.UsageMetadata.Builder addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.cloud.aiplatform.v1.ModalityTokenCount> |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCacheTokensDetails(ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(ModalityTokenCount value)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCacheTokensDetails(ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(ModalityTokenCount.Builder builderForValue)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCacheTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCacheTokensDetailsBuilder()
public ModalityTokenCount.Builder addCacheTokensDetailsBuilder()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addCacheTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder addCacheTokensDetailsBuilder(int index)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addCandidatesTokensDetails(ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount value)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCandidatesTokensDetails(ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCandidatesTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addCandidatesTokensDetailsBuilder()
public ModalityTokenCount.Builder addCandidatesTokensDetailsBuilder()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addCandidatesTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder addCandidatesTokensDetailsBuilder(int index)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addPromptTokensDetails(ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(ModalityTokenCount value)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addPromptTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
addPromptTokensDetailsBuilder()
public ModalityTokenCount.Builder addPromptTokensDetailsBuilder()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addPromptTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder addPromptTokensDetailsBuilder(int index)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.UsageMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
build()
public GenerateContentResponse.UsageMetadata build()
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata |
buildPartial()
public GenerateContentResponse.UsageMetadata buildPartial()
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata |
clear()
public GenerateContentResponse.UsageMetadata.Builder clear()
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearCacheTokensDetails()
public GenerateContentResponse.UsageMetadata.Builder clearCacheTokensDetails()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearCachedContentTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearCachedContentTokenCount()
Output only. Number of tokens in the cached part in the input (the cached content).
int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
clearCandidatesTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
clearCandidatesTokensDetails()
public GenerateContentResponse.UsageMetadata.Builder clearCandidatesTokensDetails()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearField(Descriptors.FieldDescriptor field)
public GenerateContentResponse.UsageMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerateContentResponse.UsageMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearPromptTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearPromptTokenCount()
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 |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
clearPromptTokensDetails()
public GenerateContentResponse.UsageMetadata.Builder clearPromptTokensDetails()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
clearTotalTokenCount()
public GenerateContentResponse.UsageMetadata.Builder clearTotalTokenCount()
Total token count for prompt and response candidates.
int32 total_token_count = 3;
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
clone()
public GenerateContentResponse.UsageMetadata.Builder clone()
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
getCacheTokensDetails(int index)
public ModalityTokenCount getCacheTokensDetails(int index)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount |
getCacheTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder getCacheTokensDetailsBuilder(int index)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
getCacheTokensDetailsBuilderList()
public List<ModalityTokenCount.Builder> getCacheTokensDetailsBuilderList()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<Builder> |
getCacheTokensDetailsCount()
public int getCacheTokensDetailsCount()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
getCacheTokensDetailsList()
public List<ModalityTokenCount> getCacheTokensDetailsList()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<ModalityTokenCount> |
getCacheTokensDetailsOrBuilder(int index)
public ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder(int index)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCountOrBuilder |
getCacheTokensDetailsOrBuilderList()
public List<? extends ModalityTokenCountOrBuilder> getCacheTokensDetailsOrBuilderList()
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.aiplatform.v1.ModalityTokenCountOrBuilder> |
getCachedContentTokenCount()
public int getCachedContentTokenCount()
Output only. Number of tokens in the cached part in the input (the cached content).
int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
The cachedContentTokenCount. |
getCandidatesTokenCount()
public int getCandidatesTokenCount()
Number of tokens in the response(s).
int32 candidates_token_count = 2;
Returns | |
---|---|
Type | Description |
int |
The candidatesTokenCount. |
getCandidatesTokensDetails(int index)
public ModalityTokenCount getCandidatesTokensDetails(int index)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount |
getCandidatesTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder getCandidatesTokensDetailsBuilder(int index)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
getCandidatesTokensDetailsBuilderList()
public List<ModalityTokenCount.Builder> getCandidatesTokensDetailsBuilderList()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<Builder> |
getCandidatesTokensDetailsCount()
public int getCandidatesTokensDetailsCount()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
getCandidatesTokensDetailsList()
public List<ModalityTokenCount> getCandidatesTokensDetailsList()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<ModalityTokenCount> |
getCandidatesTokensDetailsOrBuilder(int index)
public ModalityTokenCountOrBuilder getCandidatesTokensDetailsOrBuilder(int index)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCountOrBuilder |
getCandidatesTokensDetailsOrBuilderList()
public List<? extends ModalityTokenCountOrBuilder> getCandidatesTokensDetailsOrBuilderList()
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.aiplatform.v1.ModalityTokenCountOrBuilder> |
getDefaultInstanceForType()
public GenerateContentResponse.UsageMetadata getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getPromptTokenCount()
public int getPromptTokenCount()
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. |
getPromptTokensDetails(int index)
public ModalityTokenCount getPromptTokensDetails(int index)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount |
getPromptTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder getPromptTokensDetailsBuilder(int index)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCount.Builder |
getPromptTokensDetailsBuilderList()
public List<ModalityTokenCount.Builder> getPromptTokensDetailsBuilderList()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<Builder> |
getPromptTokensDetailsCount()
public int getPromptTokensDetailsCount()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
getPromptTokensDetailsList()
public List<ModalityTokenCount> getPromptTokensDetailsList()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<ModalityTokenCount> |
getPromptTokensDetailsOrBuilder(int index)
public ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder(int index)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
ModalityTokenCountOrBuilder |
getPromptTokensDetailsOrBuilderList()
public List<? extends ModalityTokenCountOrBuilder> getPromptTokensDetailsOrBuilderList()
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.aiplatform.v1.ModalityTokenCountOrBuilder> |
getTotalTokenCount()
public int getTotalTokenCount()
Total token count for prompt and response candidates.
int32 total_token_count = 3;
Returns | |
---|---|
Type | Description |
int |
The totalTokenCount. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(GenerateContentResponse.UsageMetadata other)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(GenerateContentResponse.UsageMetadata other)
Parameter | |
---|---|
Name | Description |
other |
GenerateContentResponse.UsageMetadata |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public GenerateContentResponse.UsageMetadata.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.UsageMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
removeCacheTokensDetails(int index)
public GenerateContentResponse.UsageMetadata.Builder removeCacheTokensDetails(int index)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
removeCandidatesTokensDetails(int index)
public GenerateContentResponse.UsageMetadata.Builder removeCandidatesTokensDetails(int index)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
removePromptTokensDetails(int index)
public GenerateContentResponse.UsageMetadata.Builder removePromptTokensDetails(int index)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setCacheTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder setCacheTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities of the cached content in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setCachedContentTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setCachedContentTokenCount(int value)
Output only. Number of tokens in the cached part in the input (the cached content).
int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
int The cachedContentTokenCount to set. |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
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. |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
setCandidatesTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder setCandidatesTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were returned in the response.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.UsageMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setPromptTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setPromptTokenCount(int value)
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. |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
setPromptTokensDetails(int index, ModalityTokenCount value)
public GenerateContentResponse.UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount value)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
ModalityTokenCount |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public GenerateContentResponse.UsageMetadata.Builder setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
Output only. List of modalities that were processed in the request input.
repeated .google.cloud.aiplatform.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerateContentResponse.UsageMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
setTotalTokenCount(int value)
public GenerateContentResponse.UsageMetadata.Builder setTotalTokenCount(int value)
Total token count for prompt and response candidates.
int32 total_token_count = 3;
Parameter | |
---|---|
Name | Description |
value |
int The totalTokenCount to set. |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.UsageMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
GenerateContentResponse.UsageMetadata.Builder |