Class SafetyRating.Builder

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

public static final class SafetyRating.Builder extends com.google.protobuf.GeneratedMessage.Builder<SafetyRating.Builder> implements SafetyRatingOrBuilder
 Safety rating corresponding to the generated content.
 
Protobuf type google.cloud.aiplatform.v1.SafetyRating
  • 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<SafetyRating.Builder>
    • clear

      public SafetyRating.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<SafetyRating.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<SafetyRating.Builder>
    • getDefaultInstanceForType

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

      public SafetyRating build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SafetyRating buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SafetyRating.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<SafetyRating.Builder>
    • mergeFrom

      public SafetyRating.Builder mergeFrom(SafetyRating other)
    • isInitialized

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

      public SafetyRating.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<SafetyRating.Builder>
      Throws:
      IOException
    • getCategoryValue

      public int getCategoryValue()
       Output only. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCategoryValue in interface SafetyRatingOrBuilder
      Returns:
      The enum numeric value on the wire for category.
    • setCategoryValue

      public SafetyRating.Builder setCategoryValue(int value)
       Output only. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for category to set.
      Returns:
      This builder for chaining.
    • getCategory

      public HarmCategory getCategory()
       Output only. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCategory in interface SafetyRatingOrBuilder
      Returns:
      The category.
    • setCategory

      public SafetyRating.Builder setCategory(HarmCategory value)
       Output only. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The category to set.
      Returns:
      This builder for chaining.
    • clearCategory

      public SafetyRating.Builder clearCategory()
       Output only. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getProbabilityValue

      public int getProbabilityValue()
       Output only. Harm probability levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getProbabilityValue in interface SafetyRatingOrBuilder
      Returns:
      The enum numeric value on the wire for probability.
    • setProbabilityValue

      public SafetyRating.Builder setProbabilityValue(int value)
       Output only. Harm probability levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for probability to set.
      Returns:
      This builder for chaining.
    • getProbability

      public SafetyRating.HarmProbability getProbability()
       Output only. Harm probability levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getProbability in interface SafetyRatingOrBuilder
      Returns:
      The probability.
    • setProbability

      public SafetyRating.Builder setProbability(SafetyRating.HarmProbability value)
       Output only. Harm probability levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The probability to set.
      Returns:
      This builder for chaining.
    • clearProbability

      public SafetyRating.Builder clearProbability()
       Output only. Harm probability levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getProbabilityScore

      public float getProbabilityScore()
       Output only. Harm probability score.
       
      float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getProbabilityScore in interface SafetyRatingOrBuilder
      Returns:
      The probabilityScore.
    • setProbabilityScore

      public SafetyRating.Builder setProbabilityScore(float value)
       Output only. Harm probability score.
       
      float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The probabilityScore to set.
      Returns:
      This builder for chaining.
    • clearProbabilityScore

      public SafetyRating.Builder clearProbabilityScore()
       Output only. Harm probability score.
       
      float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getSeverityValue

      public int getSeverityValue()
       Output only. Harm severity levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSeverityValue in interface SafetyRatingOrBuilder
      Returns:
      The enum numeric value on the wire for severity.
    • setSeverityValue

      public SafetyRating.Builder setSeverityValue(int value)
       Output only. Harm severity levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for severity to set.
      Returns:
      This builder for chaining.
    • getSeverity

      public SafetyRating.HarmSeverity getSeverity()
       Output only. Harm severity levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSeverity in interface SafetyRatingOrBuilder
      Returns:
      The severity.
    • setSeverity

      public SafetyRating.Builder setSeverity(SafetyRating.HarmSeverity value)
       Output only. Harm severity levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The severity to set.
      Returns:
      This builder for chaining.
    • clearSeverity

      public SafetyRating.Builder clearSeverity()
       Output only. Harm severity levels in the content.
       
      .google.cloud.aiplatform.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getSeverityScore

      public float getSeverityScore()
       Output only. Harm severity score.
       
      float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSeverityScore in interface SafetyRatingOrBuilder
      Returns:
      The severityScore.
    • setSeverityScore

      public SafetyRating.Builder setSeverityScore(float value)
       Output only. Harm severity score.
       
      float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The severityScore to set.
      Returns:
      This builder for chaining.
    • clearSeverityScore

      public SafetyRating.Builder clearSeverityScore()
       Output only. Harm severity score.
       
      float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getBlocked

      public boolean getBlocked()
       Output only. Indicates whether the content was filtered out because of this
       rating.
       
      bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBlocked in interface SafetyRatingOrBuilder
      Returns:
      The blocked.
    • setBlocked

      public SafetyRating.Builder setBlocked(boolean value)
       Output only. Indicates whether the content was filtered out because of this
       rating.
       
      bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The blocked to set.
      Returns:
      This builder for chaining.
    • clearBlocked

      public SafetyRating.Builder clearBlocked()
       Output only. Indicates whether the content was filtered out because of this
       rating.
       
      bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.