public class DetectModerationLabelsRequest extends AmazonWebServiceRequest implements Serializable
Detects explicit or suggestive adult content in a specified JPEG or PNG
format image. Use DetectModerationLabels
to moderate images
depending on your requirements. For example, you might want to filter images
that contain nudity, but not images containing suggestive content.
To filter images, use the labels returned by
DetectModerationLabels
to determine which types of content are
appropriate.
For information about moderation labels, see Detecting Unsafe Content in the Amazon Rekognition Developer Guide.
You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.
Constructor and Description |
---|
DetectModerationLabelsRequest()
Default constructor for DetectModerationLabelsRequest object.
|
DetectModerationLabelsRequest(Image image)
Constructs a new DetectModerationLabelsRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Image |
getImage()
The input image as base64-encoded bytes or an S3 object.
|
Float |
getMinConfidence()
Specifies the minimum confidence level for the labels to return.
|
int |
hashCode() |
void |
setImage(Image image)
The input image as base64-encoded bytes or an S3 object.
|
void |
setMinConfidence(Float minConfidence)
Specifies the minimum confidence level for the labels to return.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DetectModerationLabelsRequest |
withImage(Image image)
The input image as base64-encoded bytes or an S3 object.
|
DetectModerationLabelsRequest |
withMinConfidence(Float minConfidence)
Specifies the minimum confidence level for the labels to return.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public DetectModerationLabelsRequest()
public DetectModerationLabelsRequest(Image image)
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
public Image getImage()
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
public void setImage(Image image)
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
public DetectModerationLabelsRequest withImage(Image image)
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
Returns a reference to this object so that method calls can be chained together.
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
public Float getMinConfidence()
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Constraints:
Length: 0 - 100
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to 50
percent.
public void setMinConfidence(Float minConfidence)
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Constraints:
Length: 0 - 100
minConfidence
- Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to
50 percent.
public DetectModerationLabelsRequest withMinConfidence(Float minConfidence)
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
minConfidence
- Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to
50 percent.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2018. All rights reserved.