/* * 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; /** *
* The quality of an image provided for label detection, with regard to * brightness, sharpness, and contrast. *
*/ public class DetectLabelsImageQuality implements Serializable { /** ** The brightness of an image provided for label detection. *
*/ private Float brightness; /** ** The sharpness of an image provided for label detection. *
*/ private Float sharpness; /** ** The contrast of an image provided for label detection. *
*/ private Float contrast; /** ** The brightness of an image provided for label detection. *
* * @return* The brightness of an image provided for label detection. *
*/ public Float getBrightness() { return brightness; } /** ** The brightness of an image provided for label detection. *
* * @param brightness* The brightness of an image provided for label detection. *
*/ public void setBrightness(Float brightness) { this.brightness = brightness; } /** ** The brightness of an image provided for label detection. *
** Returns a reference to this object so that method calls can be chained * together. * * @param brightness
* The brightness of an image provided for label detection. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectLabelsImageQuality withBrightness(Float brightness) { this.brightness = brightness; return this; } /** ** The sharpness of an image provided for label detection. *
* * @return* The sharpness of an image provided for label detection. *
*/ public Float getSharpness() { return sharpness; } /** ** The sharpness of an image provided for label detection. *
* * @param sharpness* The sharpness of an image provided for label detection. *
*/ public void setSharpness(Float sharpness) { this.sharpness = sharpness; } /** ** The sharpness of an image provided for label detection. *
** Returns a reference to this object so that method calls can be chained * together. * * @param sharpness
* The sharpness of an image provided for label detection. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectLabelsImageQuality withSharpness(Float sharpness) { this.sharpness = sharpness; return this; } /** ** The contrast of an image provided for label detection. *
* * @return* The contrast of an image provided for label detection. *
*/ public Float getContrast() { return contrast; } /** ** The contrast of an image provided for label detection. *
* * @param contrast* The contrast of an image provided for label detection. *
*/ public void setContrast(Float contrast) { this.contrast = contrast; } /** ** The contrast of an image provided for label detection. *
** Returns a reference to this object so that method calls can be chained * together. * * @param contrast
* The contrast of an image provided for label detection. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectLabelsImageQuality withContrast(Float contrast) { this.contrast = contrast; 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() + ","); if (getContrast() != null) sb.append("Contrast: " + getContrast()); 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()); hashCode = prime * hashCode + ((getContrast() == null) ? 0 : getContrast().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectLabelsImageQuality == false) return false; DetectLabelsImageQuality other = (DetectLabelsImageQuality) 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; if (other.getContrast() == null ^ this.getContrast() == null) return false; if (other.getContrast() != null && other.getContrast().equals(this.getContrast()) == false) return false; return true; } }