* Returns a reference to this object so that method calls can be chained
* together.
*
* @param labels
* An array of labels for the real-world objects detected.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DetectLabelsResult withLabels(java.util.Collection labels) {
setLabels(labels);
return this;
}
/**
*
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain exchangeable
* image file format (Exif) metadata that includes the image's orientation.
* Amazon Rekognition uses this orientation information to perform image
* correction. The bounding box coordinates are translated to represent
* object locations after the orientation information in the Exif metadata
* is used to correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in .png
* format and .jpeg images without orientation information in the image Exif
* metadata. The bounding box coordinates aren't translated and represent
* the object locations before the image is rotated.
*
*
* Constraints:
* Allowed Values: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
*
* @return
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain
* exchangeable image file format (Exif) metadata that includes the
* image's orientation. Amazon Rekognition uses this orientation
* information to perform image correction. The bounding box
* coordinates are translated to represent object locations after
* the orientation information in the Exif metadata is used to
* correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in
* .png format and .jpeg images without orientation information in
* the image Exif metadata. The bounding box coordinates aren't
* translated and represent the object locations before the image is
* rotated.
*
* @see OrientationCorrection
*/
public String getOrientationCorrection() {
return orientationCorrection;
}
/**
*
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain exchangeable
* image file format (Exif) metadata that includes the image's orientation.
* Amazon Rekognition uses this orientation information to perform image
* correction. The bounding box coordinates are translated to represent
* object locations after the orientation information in the Exif metadata
* is used to correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in .png
* format and .jpeg images without orientation information in the image Exif
* metadata. The bounding box coordinates aren't translated and represent
* the object locations before the image is rotated.
*
*
* Constraints:
* Allowed Values: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
*
* @param orientationCorrection
* The value of OrientationCorrection
is always
* null.
*
*
* If the input image is in .jpeg format, it might contain
* exchangeable image file format (Exif) metadata that includes
* the image's orientation. Amazon Rekognition uses this
* orientation information to perform image correction. The
* bounding box coordinates are translated to represent object
* locations after the orientation information in the Exif
* metadata is used to correct the image orientation. Images in
* .png format don't contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images
* in .png format and .jpeg images without orientation
* information in the image Exif metadata. The bounding box
* coordinates aren't translated and represent the object
* locations before the image is rotated.
*
* @see OrientationCorrection
*/
public void setOrientationCorrection(String orientationCorrection) {
this.orientationCorrection = orientationCorrection;
}
/**
*
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain exchangeable
* image file format (Exif) metadata that includes the image's orientation.
* Amazon Rekognition uses this orientation information to perform image
* correction. The bounding box coordinates are translated to represent
* object locations after the orientation information in the Exif metadata
* is used to correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in .png
* format and .jpeg images without orientation information in the image Exif
* metadata. The bounding box coordinates aren't translated and represent
* the object locations before the image is rotated.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
*
* @param orientationCorrection
* The value of OrientationCorrection
is always
* null.
*
*
* If the input image is in .jpeg format, it might contain
* exchangeable image file format (Exif) metadata that includes
* the image's orientation. Amazon Rekognition uses this
* orientation information to perform image correction. The
* bounding box coordinates are translated to represent object
* locations after the orientation information in the Exif
* metadata is used to correct the image orientation. Images in
* .png format don't contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images
* in .png format and .jpeg images without orientation
* information in the image Exif metadata. The bounding box
* coordinates aren't translated and represent the object
* locations before the image is rotated.
*
* @return A reference to this updated object so that method calls can be
* chained together.
* @see OrientationCorrection
*/
public DetectLabelsResult withOrientationCorrection(String orientationCorrection) {
this.orientationCorrection = orientationCorrection;
return this;
}
/**
*
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain exchangeable
* image file format (Exif) metadata that includes the image's orientation.
* Amazon Rekognition uses this orientation information to perform image
* correction. The bounding box coordinates are translated to represent
* object locations after the orientation information in the Exif metadata
* is used to correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in .png
* format and .jpeg images without orientation information in the image Exif
* metadata. The bounding box coordinates aren't translated and represent
* the object locations before the image is rotated.
*
*
* Constraints:
* Allowed Values: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
*
* @param orientationCorrection
* The value of OrientationCorrection
is always
* null.
*
*
* If the input image is in .jpeg format, it might contain
* exchangeable image file format (Exif) metadata that includes
* the image's orientation. Amazon Rekognition uses this
* orientation information to perform image correction. The
* bounding box coordinates are translated to represent object
* locations after the orientation information in the Exif
* metadata is used to correct the image orientation. Images in
* .png format don't contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images
* in .png format and .jpeg images without orientation
* information in the image Exif metadata. The bounding box
* coordinates aren't translated and represent the object
* locations before the image is rotated.
*
* @see OrientationCorrection
*/
public void setOrientationCorrection(OrientationCorrection orientationCorrection) {
this.orientationCorrection = orientationCorrection.toString();
}
/**
*
* The value of OrientationCorrection
is always null.
*
*
* If the input image is in .jpeg format, it might contain exchangeable
* image file format (Exif) metadata that includes the image's orientation.
* Amazon Rekognition uses this orientation information to perform image
* correction. The bounding box coordinates are translated to represent
* object locations after the orientation information in the Exif metadata
* is used to correct the image orientation. Images in .png format don't
* contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images in .png
* format and .jpeg images without orientation information in the image Exif
* metadata. The bounding box coordinates aren't translated and represent
* the object locations before the image is rotated.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
*
* @param orientationCorrection
* The value of OrientationCorrection
is always
* null.
*
*
* If the input image is in .jpeg format, it might contain
* exchangeable image file format (Exif) metadata that includes
* the image's orientation. Amazon Rekognition uses this
* orientation information to perform image correction. The
* bounding box coordinates are translated to represent object
* locations after the orientation information in the Exif
* metadata is used to correct the image orientation. Images in
* .png format don't contain Exif metadata.
*
*
* Amazon Rekognition doesn’t perform image correction for images
* in .png format and .jpeg images without orientation
* information in the image Exif metadata. The bounding box
* coordinates aren't translated and represent the object
* locations before the image is rotated.
*
* @return A reference to this updated object so that method calls can be
* chained together.
* @see OrientationCorrection
*/
public DetectLabelsResult withOrientationCorrection(OrientationCorrection orientationCorrection) {
this.orientationCorrection = orientationCorrection.toString();
return this;
}
/**
*
* Version number of the label detection model that was used to detect
* labels.
*
*
* @return
* Version number of the label detection model that was used to
* detect labels.
*
*/
public String getLabelModelVersion() {
return labelModelVersion;
}
/**
*
* Version number of the label detection model that was used to detect
* labels.
*
*
* @param labelModelVersion
* Version number of the label detection model that was used to
* detect labels.
*
*/
public void setLabelModelVersion(String labelModelVersion) {
this.labelModelVersion = labelModelVersion;
}
/**
*
* Version number of the label detection model that was used to detect
* labels.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param labelModelVersion
* Version number of the label detection model that was used to
* detect labels.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DetectLabelsResult withLabelModelVersion(String labelModelVersion) {
this.labelModelVersion = labelModelVersion;
return this;
}
/**
*
* Information about the properties of the input image, such as brightness,
* sharpness, contrast, and dominant colors.
*
*
* @return
* Information about the properties of the input image, such as
* brightness, sharpness, contrast, and dominant colors.
*
*/
public DetectLabelsImageProperties getImageProperties() {
return imageProperties;
}
/**
*
* Information about the properties of the input image, such as brightness,
* sharpness, contrast, and dominant colors.
*
*
* @param imageProperties
* Information about the properties of the input image, such as
* brightness, sharpness, contrast, and dominant colors.
*
*/
public void setImageProperties(DetectLabelsImageProperties imageProperties) {
this.imageProperties = imageProperties;
}
/**
*
* Information about the properties of the input image, such as brightness,
* sharpness, contrast, and dominant colors.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param imageProperties
* Information about the properties of the input image, such as
* brightness, sharpness, contrast, and dominant colors.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DetectLabelsResult withImageProperties(DetectLabelsImageProperties imageProperties) {
this.imageProperties = imageProperties;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getLabels() != null)
sb.append("Labels: " + getLabels() + ",");
if (getOrientationCorrection() != null)
sb.append("OrientationCorrection: " + getOrientationCorrection() + ",");
if (getLabelModelVersion() != null)
sb.append("LabelModelVersion: " + getLabelModelVersion() + ",");
if (getImageProperties() != null)
sb.append("ImageProperties: " + getImageProperties());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLabels() == null) ? 0 : getLabels().hashCode());
hashCode = prime
* hashCode
+ ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode());
hashCode = prime * hashCode
+ ((getLabelModelVersion() == null) ? 0 : getLabelModelVersion().hashCode());
hashCode = prime * hashCode
+ ((getImageProperties() == null) ? 0 : getImageProperties().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DetectLabelsResult == false)
return false;
DetectLabelsResult other = (DetectLabelsResult) obj;
if (other.getLabels() == null ^ this.getLabels() == null)
return false;
if (other.getLabels() != null && other.getLabels().equals(this.getLabels()) == false)
return false;
if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null)
return false;
if (other.getOrientationCorrection() != null
&& other.getOrientationCorrection().equals(this.getOrientationCorrection()) == false)
return false;
if (other.getLabelModelVersion() == null ^ this.getLabelModelVersion() == null)
return false;
if (other.getLabelModelVersion() != null
&& other.getLabelModelVersion().equals(this.getLabelModelVersion()) == false)
return false;
if (other.getImageProperties() == null ^ this.getImageProperties() == null)
return false;
if (other.getImageProperties() != null
&& other.getImageProperties().equals(this.getImageProperties()) == false)
return false;
return true;
}
}