Class GenerateContentResponse.PromptFeedback.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
com.google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.Builder
All Implemented Interfaces:
GenerateContentResponse.PromptFeedbackOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GenerateContentResponse.PromptFeedback

public static final class GenerateContentResponse.PromptFeedback.Builder extends com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder> implements GenerateContentResponse.PromptFeedbackOrBuilder
 Content filter results for a prompt sent in the request.
 
Protobuf type google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback
  • 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.Builder<GenerateContentResponse.PromptFeedback.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public GenerateContentResponse.PromptFeedback.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
    • mergeFrom

      public GenerateContentResponse.PromptFeedback.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
      Throws:
      IOException
    • getBlockReasonValue

      public int getBlockReasonValue()
       Output only. Blocked reason.
       
      .google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBlockReasonValue in interface GenerateContentResponse.PromptFeedbackOrBuilder
      Returns:
      The enum numeric value on the wire for blockReason.
    • setBlockReasonValue

      public GenerateContentResponse.PromptFeedback.Builder setBlockReasonValue(int value)
       Output only. Blocked reason.
       
      .google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for blockReason to set.
      Returns:
      This builder for chaining.
    • getBlockReason

       Output only. Blocked reason.
       
      .google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBlockReason in interface GenerateContentResponse.PromptFeedbackOrBuilder
      Returns:
      The blockReason.
    • setBlockReason

       Output only. Blocked reason.
       
      .google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The blockReason to set.
      Returns:
      This builder for chaining.
    • clearBlockReason

       Output only. Blocked reason.
       
      .google.cloud.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getSafetyRatingsList

      public List<SafetyRating> getSafetyRatingsList()
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSafetyRatingsList in interface GenerateContentResponse.PromptFeedbackOrBuilder
    • getSafetyRatingsCount

      public int getSafetyRatingsCount()
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSafetyRatingsCount in interface GenerateContentResponse.PromptFeedbackOrBuilder
    • getSafetyRatings

      public SafetyRating getSafetyRatings(int index)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSafetyRatings in interface GenerateContentResponse.PromptFeedbackOrBuilder
    • setSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating value)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating.Builder builderForValue)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addSafetyRatings

       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating value)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(SafetyRating.Builder builderForValue)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating.Builder builderForValue)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder addAllSafetyRatings(Iterable<? extends SafetyRating> values)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearSafetyRatings

       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeSafetyRatings

      public GenerateContentResponse.PromptFeedback.Builder removeSafetyRatings(int index)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getSafetyRatingsBuilder

      public SafetyRating.Builder getSafetyRatingsBuilder(int index)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getSafetyRatingsOrBuilder

      public SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSafetyRatingsOrBuilder in interface GenerateContentResponse.PromptFeedbackOrBuilder
    • getSafetyRatingsOrBuilderList

      public List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSafetyRatingsOrBuilderList in interface GenerateContentResponse.PromptFeedbackOrBuilder
    • addSafetyRatingsBuilder

      public SafetyRating.Builder addSafetyRatingsBuilder()
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addSafetyRatingsBuilder

      public SafetyRating.Builder addSafetyRatingsBuilder(int index)
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getSafetyRatingsBuilderList

      public List<SafetyRating.Builder> getSafetyRatingsBuilderList()
       Output only. Safety ratings.
       
      repeated .google.cloud.aiplatform.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getBlockReasonMessage

      public String getBlockReasonMessage()
       Output only. A readable block reason message.
       
      string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBlockReasonMessage in interface GenerateContentResponse.PromptFeedbackOrBuilder
      Returns:
      The blockReasonMessage.
    • getBlockReasonMessageBytes

      public com.google.protobuf.ByteString getBlockReasonMessageBytes()
       Output only. A readable block reason message.
       
      string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBlockReasonMessageBytes in interface GenerateContentResponse.PromptFeedbackOrBuilder
      Returns:
      The bytes for blockReasonMessage.
    • setBlockReasonMessage

      public GenerateContentResponse.PromptFeedback.Builder setBlockReasonMessage(String value)
       Output only. A readable block reason message.
       
      string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The blockReasonMessage to set.
      Returns:
      This builder for chaining.
    • clearBlockReasonMessage

      public GenerateContentResponse.PromptFeedback.Builder clearBlockReasonMessage()
       Output only. A readable block reason message.
       
      string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setBlockReasonMessageBytes

      public GenerateContentResponse.PromptFeedback.Builder setBlockReasonMessageBytes(com.google.protobuf.ByteString value)
       Output only. A readable block reason message.
       
      string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for blockReasonMessage to set.
      Returns:
      This builder for chaining.