Package com.google.cloud.aiplatform.v1
Class GenerateContentResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
com.google.cloud.aiplatform.v1.GenerateContentResponse.Builder
- All Implemented Interfaces:
GenerateContentResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GenerateContentResponse
public static final class GenerateContentResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
implements GenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].Protobuf type
google.cloud.aiplatform.v1.GenerateContentResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllCandidates(Iterable<? extends Candidate> values) Output only.addCandidates(int index, Candidate value) Output only.addCandidates(int index, Candidate.Builder builderForValue) Output only.addCandidates(Candidate value) Output only.addCandidates(Candidate.Builder builderForValue) Output only.Output only.addCandidatesBuilder(int index) Output only.build()clear()Output only.Output only.Output only.Output only.Output only. response_id is used to identify each response.Usage metadata about the response(s).getCandidates(int index) Output only.getCandidatesBuilder(int index) Output only.Output only.intOutput only.Output only.getCandidatesOrBuilder(int index) Output only.List<? extends CandidateOrBuilder>Output only.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOutput only.com.google.protobuf.ByteStringOutput only.Output only.Output only.Output only.Output only. response_id is used to identify each response.com.google.protobuf.ByteStringOutput only. response_id is used to identify each response.Usage metadata about the response(s).Usage metadata about the response(s).Usage metadata about the response(s).booleanOutput only.booleanOutput only.booleanUsage metadata about the response(s).protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(GenerateContentResponse other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Output only.Usage metadata about the response(s).removeCandidates(int index) Output only.setCandidates(int index, Candidate value) Output only.setCandidates(int index, Candidate.Builder builderForValue) Output only.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setModelVersion(String value) Output only.setModelVersionBytes(com.google.protobuf.ByteString value) Output only.Output only.setPromptFeedback(GenerateContentResponse.PromptFeedback.Builder builderForValue) Output only.setResponseId(String value) Output only. response_id is used to identify each response.setResponseIdBytes(com.google.protobuf.ByteString value) Output only. response_id is used to identify each response.Usage metadata about the response(s).setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue) Usage metadata about the response(s).Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.Builder>
-
mergeFrom
public GenerateContentResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.Builder>- Throws:
IOException
-
getCandidatesList
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesListin interfaceGenerateContentResponseOrBuilder
-
getCandidatesCount
public int getCandidatesCount()Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesCountin interfaceGenerateContentResponseOrBuilder
-
getCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesin interfaceGenerateContentResponseOrBuilder
-
setCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addAllCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
removeCandidates
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCandidatesBuilder
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCandidatesOrBuilder
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesOrBuilderin interfaceGenerateContentResponseOrBuilder
-
getCandidatesOrBuilderList
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesOrBuilderListin interfaceGenerateContentResponseOrBuilder
-
addCandidatesBuilder
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addCandidatesBuilder
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCandidatesBuilderList
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getModelVersion
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getModelVersionin interfaceGenerateContentResponseOrBuilder- Returns:
- The modelVersion.
-
getModelVersionBytes
public com.google.protobuf.ByteString getModelVersionBytes()Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getModelVersionBytesin interfaceGenerateContentResponseOrBuilder- Returns:
- The bytes for modelVersion.
-
setModelVersion
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The modelVersion to set.- Returns:
- This builder for chaining.
-
clearModelVersion
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setModelVersionBytes
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for modelVersion to set.- Returns:
- This builder for chaining.
-
hasCreateTime
public boolean hasCreateTime()Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasCreateTimein interfaceGenerateContentResponseOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.Timestamp getCreateTime()Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimein interfaceGenerateContentResponseOrBuilder- Returns:
- The createTime.
-
setCreateTime
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setCreateTime
public GenerateContentResponse.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeCreateTime
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearCreateTime
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeBuilder
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimeOrBuilderin interfaceGenerateContentResponseOrBuilder
-
getResponseId
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getResponseIdin interfaceGenerateContentResponseOrBuilder- Returns:
- The responseId.
-
getResponseIdBytes
public com.google.protobuf.ByteString getResponseIdBytes()Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getResponseIdBytesin interfaceGenerateContentResponseOrBuilder- Returns:
- The bytes for responseId.
-
setResponseId
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The responseId to set.- Returns:
- This builder for chaining.
-
clearResponseId
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setResponseIdBytes
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for responseId to set.- Returns:
- This builder for chaining.
-
hasPromptFeedback
public boolean hasPromptFeedback()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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasPromptFeedbackin interfaceGenerateContentResponseOrBuilder- Returns:
- Whether the promptFeedback field is set.
-
getPromptFeedback
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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptFeedbackin interfaceGenerateContentResponseOrBuilder- Returns:
- The promptFeedback.
-
setPromptFeedback
public GenerateContentResponse.Builder setPromptFeedback(GenerateContentResponse.PromptFeedback value) 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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setPromptFeedback
public GenerateContentResponse.Builder setPromptFeedback(GenerateContentResponse.PromptFeedback.Builder builderForValue) 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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergePromptFeedback
public GenerateContentResponse.Builder mergePromptFeedback(GenerateContentResponse.PromptFeedback value) 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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearPromptFeedback
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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getPromptFeedbackBuilder
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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getPromptFeedbackOrBuilder
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.aiplatform.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPromptFeedbackOrBuilderin interfaceGenerateContentResponseOrBuilder
-
hasUsageMetadata
public boolean hasUsageMetadata()Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;- Specified by:
hasUsageMetadatain interfaceGenerateContentResponseOrBuilder- Returns:
- Whether the usageMetadata field is set.
-
getUsageMetadata
Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;- Specified by:
getUsageMetadatain interfaceGenerateContentResponseOrBuilder- Returns:
- The usageMetadata.
-
setUsageMetadata
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata value) Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; -
setUsageMetadata
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue) Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; -
mergeUsageMetadata
public GenerateContentResponse.Builder mergeUsageMetadata(GenerateContentResponse.UsageMetadata value) Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; -
clearUsageMetadata
Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; -
getUsageMetadataBuilder
Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; -
getUsageMetadataOrBuilder
Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;- Specified by:
getUsageMetadataOrBuilderin interfaceGenerateContentResponseOrBuilder
-