/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; /** *
* Identifies face image brightness and sharpness. *
*/ public class ImageQuality implements Serializable { /** ** Value representing brightness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a brighter face * image. *
*/ private Float brightness; /** ** Value representing sharpness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a sharper face * image. *
*/ private Float sharpness; /** ** Value representing brightness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a brighter face * image. *
* * @return* Value representing brightness of the face. The service returns a * value between 0 and 100 (inclusive). A higher value indicates a * brighter face image. *
*/ public Float getBrightness() { return brightness; } /** ** Value representing brightness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a brighter face * image. *
* * @param brightness* Value representing brightness of the face. The service returns * a value between 0 and 100 (inclusive). A higher value * indicates a brighter face image. *
*/ public void setBrightness(Float brightness) { this.brightness = brightness; } /** ** Value representing brightness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a brighter face * image. *
** Returns a reference to this object so that method calls can be chained * together. * * @param brightness
* Value representing brightness of the face. The service returns * a value between 0 and 100 (inclusive). A higher value * indicates a brighter face image. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImageQuality withBrightness(Float brightness) { this.brightness = brightness; return this; } /** ** Value representing sharpness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a sharper face * image. *
* * @return* Value representing sharpness of the face. The service returns a * value between 0 and 100 (inclusive). A higher value indicates a * sharper face image. *
*/ public Float getSharpness() { return sharpness; } /** ** Value representing sharpness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a sharper face * image. *
* * @param sharpness* Value representing sharpness of the face. The service returns * a value between 0 and 100 (inclusive). A higher value * indicates a sharper face image. *
*/ public void setSharpness(Float sharpness) { this.sharpness = sharpness; } /** ** Value representing sharpness of the face. The service returns a value * between 0 and 100 (inclusive). A higher value indicates a sharper face * image. *
** Returns a reference to this object so that method calls can be chained * together. * * @param sharpness
* Value representing sharpness of the face. The service returns * a value between 0 and 100 (inclusive). A higher value * indicates a sharper face image. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImageQuality withSharpness(Float sharpness) { this.sharpness = sharpness; 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 (getBrightness() != null) sb.append("Brightness: " + getBrightness() + ","); if (getSharpness() != null) sb.append("Sharpness: " + getSharpness()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBrightness() == null) ? 0 : getBrightness().hashCode()); hashCode = prime * hashCode + ((getSharpness() == null) ? 0 : getSharpness().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImageQuality == false) return false; ImageQuality other = (ImageQuality) obj; if (other.getBrightness() == null ^ this.getBrightness() == null) return false; if (other.getBrightness() != null && other.getBrightness().equals(this.getBrightness()) == false) return false; if (other.getSharpness() == null ^ this.getSharpness() == null) return false; if (other.getSharpness() != null && other.getSharpness().equals(this.getSharpness()) == false) return false; return true; } }