Package com.google.cloud.aiplatform.v1
Class GenerateContentResponse
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.GenerateContentResponse
- All Implemented Interfaces:
GenerateContentResponseOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class GenerateContentResponse
extends com.google.protobuf.GeneratedMessage
implements GenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].Protobuf type
google.cloud.aiplatform.v1.GenerateContentResponse- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classResponse message for [PredictionService.GenerateContent].static final classContent filter results for a prompt sent in the request.static interfacestatic final classUsage metadata about response(s).static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCandidates(int index) Output only.intOutput only.Output only.getCandidatesOrBuilder(int index) Output only.List<? extends CandidateOrBuilder>Output only.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static GenerateContentResponsestatic final com.google.protobuf.Descriptors.DescriptorOutput only.com.google.protobuf.ByteStringOutput only.com.google.protobuf.Parser<GenerateContentResponse>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.intUsage metadata about the response(s).Usage metadata about the response(s).booleanOutput only.inthashCode()booleanOutput only.booleanUsage metadata about the response(s).protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(GenerateContentResponse prototype) protected GenerateContentResponse.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static GenerateContentResponseparseDelimitedFrom(InputStream input) static GenerateContentResponseparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GenerateContentResponseparseFrom(byte[] data) static GenerateContentResponseparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GenerateContentResponseparseFrom(com.google.protobuf.ByteString data) static GenerateContentResponseparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GenerateContentResponseparseFrom(com.google.protobuf.CodedInputStream input) static GenerateContentResponseparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GenerateContentResponseparseFrom(InputStream input) static GenerateContentResponseparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GenerateContentResponseparseFrom(ByteBuffer data) static GenerateContentResponseparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<GenerateContentResponse>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
CANDIDATES_FIELD_NUMBER
public static final int CANDIDATES_FIELD_NUMBER- See Also:
-
MODEL_VERSION_FIELD_NUMBER
public static final int MODEL_VERSION_FIELD_NUMBER- See Also:
-
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER- See Also:
-
RESPONSE_ID_FIELD_NUMBER
public static final int RESPONSE_ID_FIELD_NUMBER- See Also:
-
PROMPT_FEEDBACK_FIELD_NUMBER
public static final int PROMPT_FEEDBACK_FIELD_NUMBER- See Also:
-
USAGE_METADATA_FIELD_NUMBER
public static final int USAGE_METADATA_FIELD_NUMBER- See Also:
-
-
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
-
getCandidatesList
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesListin interfaceGenerateContentResponseOrBuilder
-
getCandidatesOrBuilderList
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesOrBuilderListin 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
-
getCandidatesOrBuilder
Output only. Generated candidates.
repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCandidatesOrBuilderin interfaceGenerateContentResponseOrBuilder
-
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.
-
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.
-
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.
-
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.
-
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.
-
getUsageMetadataOrBuilder
Usage metadata about the response(s).
.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;- Specified by:
getUsageMetadataOrBuilderin interfaceGenerateContentResponseOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static GenerateContentResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GenerateContentResponse parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GenerateContentResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GenerateContentResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GenerateContentResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GenerateContentResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static GenerateContentResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static GenerateContentResponse parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static GenerateContentResponse parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static GenerateContentResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected GenerateContentResponse.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-