Interface ToxicLabels.Builder

All Superinterfaces:
Buildable, CopyableBuilder<ToxicLabels.Builder,ToxicLabels>, SdkBuilder<ToxicLabels.Builder,ToxicLabels>, SdkPojo
Enclosing class:
ToxicLabels

public static interface ToxicLabels.Builder extends SdkPojo, CopyableBuilder<ToxicLabels.Builder,ToxicLabels>
  • Method Details

    • labels

      Array of toxic content types identified in the string.

      Parameters:
      labels - Array of toxic content types identified in the string.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • labels

      ToxicLabels.Builder labels(ToxicContent... labels)

      Array of toxic content types identified in the string.

      Parameters:
      labels - Array of toxic content types identified in the string.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • labels

      Array of toxic content types identified in the string.

      This is a convenience method that creates an instance of the ToxicContent.Builder avoiding the need to create one manually via ToxicContent.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to labels(List<ToxicContent>).

      Parameters:
      labels - a consumer that will call methods on ToxicContent.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • toxicity

      ToxicLabels.Builder toxicity(Float toxicity)

      Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.

      Parameters:
      toxicity - Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.
      Returns:
      Returns a reference to this object so that method calls can be chained together.