publicstaticfinalclass GenerateContentResponse.BuilderextendsGeneratedMessageV3.Builder<GenerateContentResponse.Builder>implementsGenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].
Protobuf type google.cloud.vertexai.v1.GenerateContentResponse
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
addAllCandidates(Iterable<? extends Candidate> values)
publicGenerateContentResponse.BuilderaddAllCandidates(Iterable<?extendsCandidate>values)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
values |
Iterable<? extends com.google.cloud.vertexai.api.Candidate>
|
addCandidates(Candidate value)
publicGenerateContentResponse.BuilderaddCandidates(Candidatevalue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(Candidate.Builder builderForValue)
publicGenerateContentResponse.BuilderaddCandidates(Candidate.BuilderbuilderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(int index, Candidate value)
publicGenerateContentResponse.BuilderaddCandidates(intindex,Candidatevalue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(int index, Candidate.Builder builderForValue)
publicGenerateContentResponse.BuilderaddCandidates(intindex,Candidate.BuilderbuilderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidatesBuilder()
publicCandidate.BuilderaddCandidatesBuilder()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidatesBuilder(int index)
publicCandidate.BuilderaddCandidatesBuilder(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicGenerateContentResponse.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Overrides
build()
publicGenerateContentResponsebuild()
buildPartial()
publicGenerateContentResponsebuildPartial()
clear()
publicGenerateContentResponse.Builderclear()
Overrides
clearCandidates()
publicGenerateContentResponse.BuilderclearCandidates()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearField(Descriptors.FieldDescriptor field)
publicGenerateContentResponse.BuilderclearField(Descriptors.FieldDescriptorfield)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
publicGenerateContentResponse.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Overrides
clearPromptFeedback()
publicGenerateContentResponse.BuilderclearPromptFeedback()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearUsageMetadata()
publicGenerateContentResponse.BuilderclearUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
clone()
publicGenerateContentResponse.Builderclone()
Overrides
getCandidates(int index)
publicCandidategetCandidates(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
getCandidatesBuilder(int index)
publicCandidate.BuildergetCandidatesBuilder(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
getCandidatesBuilderList()
publicList<Candidate.Builder>getCandidatesBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesCount()
publicintgetCandidatesCount()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
int |
getCandidatesList()
publicList<Candidate>getCandidatesList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesOrBuilder(int index)
publicCandidateOrBuildergetCandidatesOrBuilder(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
getCandidatesOrBuilderList()
publicList<?extendsCandidateOrBuilder>getCandidatesOrBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.CandidateOrBuilder> |
getDefaultInstanceForType()
publicGenerateContentResponsegetDefaultInstanceForType()
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()
Overrides
getPromptFeedback()
publicGenerateContentResponse.PromptFeedbackgetPromptFeedback()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackBuilder()
publicGenerateContentResponse.PromptFeedback.BuildergetPromptFeedbackBuilder()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackOrBuilder()
publicGenerateContentResponse.PromptFeedbackOrBuildergetPromptFeedbackOrBuilder()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUsageMetadata()
publicGenerateContentResponse.UsageMetadatagetUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataBuilder()
publicGenerateContentResponse.UsageMetadata.BuildergetUsageMetadataBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataOrBuilder()
publicGenerateContentResponse.UsageMetadataOrBuildergetUsageMetadataOrBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
hasPromptFeedback()
publicbooleanhasPromptFeedback()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
boolean |
Whether the promptFeedback field is set.
|
hasUsageMetadata()
publicbooleanhasUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns |
| Type |
Description |
boolean |
Whether the usageMetadata field is set.
|
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
isInitialized()
publicfinalbooleanisInitialized()
Overrides
mergeFrom(GenerateContentResponse other)
publicGenerateContentResponse.BuildermergeFrom(GenerateContentResponseother)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicGenerateContentResponse.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Overrides
mergeFrom(Message other)
publicGenerateContentResponse.BuildermergeFrom(Messageother)
| Parameter |
| Name |
Description |
other |
Message
|
Overrides
mergePromptFeedback(GenerateContentResponse.PromptFeedback value)
publicGenerateContentResponse.BuildermergePromptFeedback(GenerateContentResponse.PromptFeedbackvalue)
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalGenerateContentResponse.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Overrides
mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)
publicGenerateContentResponse.BuildermergeUsageMetadata(GenerateContentResponse.UsageMetadatavalue)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
removeCandidates(int index)
publicGenerateContentResponse.BuilderremoveCandidates(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
setCandidates(int index, Candidate value)
publicGenerateContentResponse.BuildersetCandidates(intindex,Candidatevalue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setCandidates(int index, Candidate.Builder builderForValue)
publicGenerateContentResponse.BuildersetCandidates(intindex,Candidate.BuilderbuilderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setField(Descriptors.FieldDescriptor field, Object value)
publicGenerateContentResponse.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Overrides
setPromptFeedback(GenerateContentResponse.PromptFeedback value)
publicGenerateContentResponse.BuildersetPromptFeedback(GenerateContentResponse.PromptFeedbackvalue)
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
setPromptFeedback(GenerateContentResponse.PromptFeedback.Builder builderForValue)
publicGenerateContentResponse.BuildersetPromptFeedback(GenerateContentResponse.PromptFeedback.BuilderbuilderForValue)
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicGenerateContentResponse.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalGenerateContentResponse.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Overrides
setUsageMetadata(GenerateContentResponse.UsageMetadata value)
publicGenerateContentResponse.BuildersetUsageMetadata(GenerateContentResponse.UsageMetadatavalue)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)
publicGenerateContentResponse.BuildersetUsageMetadata(GenerateContentResponse.UsageMetadata.BuilderbuilderForValue)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;