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:
  • 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getCandidatesList

      public List<Candidate> getCandidatesList()
       Output only. Generated candidates.
       
      repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesList in interface GenerateContentResponseOrBuilder
    • getCandidatesOrBuilderList

      public List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()
       Output only. Generated candidates.
       
      repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesOrBuilderList in interface GenerateContentResponseOrBuilder
    • getCandidatesCount

      public int getCandidatesCount()
       Output only. Generated candidates.
       
      repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesCount in interface GenerateContentResponseOrBuilder
    • getCandidates

      public Candidate getCandidates(int index)
       Output only. Generated candidates.
       
      repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidates in interface GenerateContentResponseOrBuilder
    • getCandidatesOrBuilder

      public CandidateOrBuilder getCandidatesOrBuilder(int index)
       Output only. Generated candidates.
       
      repeated .google.cloud.aiplatform.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCandidatesOrBuilder in interface GenerateContentResponseOrBuilder
    • getModelVersion

      public String getModelVersion()
       Output only. The model version used to generate the response.
       
      string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getModelVersion in interface GenerateContentResponseOrBuilder
      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:
      getModelVersionBytes in interface GenerateContentResponseOrBuilder
      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:
      hasCreateTime in interface GenerateContentResponseOrBuilder
      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:
      getCreateTime in interface GenerateContentResponseOrBuilder
      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:
      getCreateTimeOrBuilder in interface GenerateContentResponseOrBuilder
    • getResponseId

      public String 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:
      getResponseId in interface GenerateContentResponseOrBuilder
      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:
      getResponseIdBytes in interface GenerateContentResponseOrBuilder
      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:
      hasPromptFeedback in interface GenerateContentResponseOrBuilder
      Returns:
      Whether the promptFeedback field is set.
    • getPromptFeedback

      public GenerateContentResponse.PromptFeedback 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:
      getPromptFeedback in interface GenerateContentResponseOrBuilder
      Returns:
      The promptFeedback.
    • getPromptFeedbackOrBuilder

      public GenerateContentResponse.PromptFeedbackOrBuilder 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:
      getPromptFeedbackOrBuilder in interface GenerateContentResponseOrBuilder
    • hasUsageMetadata

      public boolean hasUsageMetadata()
       Usage metadata about the response(s).
       
      .google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
      Specified by:
      hasUsageMetadata in interface GenerateContentResponseOrBuilder
      Returns:
      Whether the usageMetadata field is set.
    • getUsageMetadata

      public GenerateContentResponse.UsageMetadata getUsageMetadata()
       Usage metadata about the response(s).
       
      .google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
      Specified by:
      getUsageMetadata in interface GenerateContentResponseOrBuilder
      Returns:
      The usageMetadata.
    • getUsageMetadataOrBuilder

      public GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()
       Usage metadata about the response(s).
       
      .google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
      Specified by:
      getUsageMetadataOrBuilder in interface GenerateContentResponseOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static GenerateContentResponse parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GenerateContentResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GenerateContentResponse parseDelimitedFrom(InputStream input) throws IOException
      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

      public GenerateContentResponse.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static GenerateContentResponse.Builder newBuilder()
    • newBuilder

      public static GenerateContentResponse.Builder newBuilder(GenerateContentResponse prototype)
    • toBuilder

      public GenerateContentResponse.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected GenerateContentResponse.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static GenerateContentResponse getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<GenerateContentResponse> parser()
    • getParserForType

      public com.google.protobuf.Parser<GenerateContentResponse> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public GenerateContentResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder