Interface DetectModerationLabelsResponse.Builder

  • Method Details

    • moderationLabels

      Array of detected Moderation labels. For video operations, this includes the time, in milliseconds from the start of the video, they were detected.

      Parameters:
      moderationLabels - Array of detected Moderation labels. For video operations, this includes the time, in milliseconds from the start of the video, they were detected.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • moderationLabels

      DetectModerationLabelsResponse.Builder moderationLabels(ModerationLabel... moderationLabels)

      Array of detected Moderation labels. For video operations, this includes the time, in milliseconds from the start of the video, they were detected.

      Parameters:
      moderationLabels - Array of detected Moderation labels. For video operations, this includes the time, in milliseconds from the start of the video, they were detected.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • moderationLabels

      Array of detected Moderation labels. For video operations, this includes the time, in milliseconds from the start of the video, they were detected.

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

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

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

      DetectModerationLabelsResponse.Builder moderationModelVersion(String moderationModelVersion)

      Version number of the base moderation detection model that was used to detect unsafe content.

      Parameters:
      moderationModelVersion - Version number of the base moderation detection model that was used to detect unsafe content.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • humanLoopActivationOutput

      DetectModerationLabelsResponse.Builder humanLoopActivationOutput(HumanLoopActivationOutput humanLoopActivationOutput)

      Shows the results of the human in the loop evaluation.

      Parameters:
      humanLoopActivationOutput - Shows the results of the human in the loop evaluation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • humanLoopActivationOutput

      default DetectModerationLabelsResponse.Builder humanLoopActivationOutput(Consumer<HumanLoopActivationOutput.Builder> humanLoopActivationOutput)

      Shows the results of the human in the loop evaluation.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to humanLoopActivationOutput(HumanLoopActivationOutput).

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

      DetectModerationLabelsResponse.Builder projectVersion(String projectVersion)

      Identifier of the custom adapter that was used during inference. If during inference the adapter was EXPIRED, then the parameter will not be returned, indicating that a base moderation detection project version was used.

      Parameters:
      projectVersion - Identifier of the custom adapter that was used during inference. If during inference the adapter was EXPIRED, then the parameter will not be returned, indicating that a base moderation detection project version was used.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentTypes

      A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.

      Parameters:
      contentTypes - A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentTypes

      DetectModerationLabelsResponse.Builder contentTypes(ContentType... contentTypes)

      A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.

      Parameters:
      contentTypes - A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentTypes

      A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.

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

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

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