@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCelebrityFaces() == null) ? 0 : getCelebrityFaces().hashCode()); hashCode = prime * hashCode + ((getUnrecognizedFaces() == null) ? 0 : getUnrecognizedFaces().hashCode()); hashCode = prime * hashCode + ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode()); return hashCode; }
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * * @param celebrityFaces * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities * in an image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withCelebrityFaces(java.util.Collection<Celebrity> celebrityFaces) { setCelebrityFaces(celebrityFaces); return this; }
setOrientationCorrection(orientationCorrection); return this;
public RecognizeCelebritiesResult unmarshall(JsonUnmarshallerContext context) throws Exception { RecognizeCelebritiesResult recognizeCelebritiesResult = new RecognizeCelebritiesResult(); if (context.testExpression("CelebrityFaces", targetDepth)) { context.nextToken(); recognizeCelebritiesResult.setCelebrityFaces(new ListUnmarshaller<Celebrity>(CelebrityJsonUnmarshaller.getInstance()).unmarshall(context)); recognizeCelebritiesResult.setUnrecognizedFaces(new ListUnmarshaller<ComparedFace>(ComparedFaceJsonUnmarshaller.getInstance()) .unmarshall(context)); recognizeCelebritiesResult.setOrientationCorrection(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * Details about each unrecognized face in the image. * </p> * * @param unrecognizedFaces * Details about each unrecognized face in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces(java.util.Collection<ComparedFace> unrecognizedFaces) { setUnrecognizedFaces(unrecognizedFaces); return this; }
/** * <p> * Details about each unrecognized face in the image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param unrecognizedFaces <p> * Details about each unrecognized face in the image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces(ComparedFace... unrecognizedFaces) { if (getUnrecognizedFaces() == null) { this.unrecognizedFaces = new java.util.ArrayList<ComparedFace>(unrecognizedFaces.length); } for (ComparedFace value : unrecognizedFaces) { this.unrecognizedFaces.add(value); } return this; }
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can * detect a maximum of 15 celebrities in an image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param celebrityFaces <p> * Details about each celebrity found in the image. Amazon * Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withCelebrityFaces(Celebrity... celebrityFaces) { if (getCelebrityFaces() == null) { this.celebrityFaces = new java.util.ArrayList<Celebrity>(celebrityFaces.length); } for (Celebrity value : celebrityFaces) { this.celebrityFaces.add(value); } return this; }
withOrientationCorrection(orientationCorrection);
public RecognizeCelebritiesResult unmarshall(JsonUnmarshallerContext context) throws Exception { RecognizeCelebritiesResult recognizeCelebritiesResult = new RecognizeCelebritiesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("CelebrityFaces")) { recognizeCelebritiesResult.setCelebrityFaces(new ListUnmarshaller<Celebrity>( CelebrityJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("UnrecognizedFaces")) { recognizeCelebritiesResult.setUnrecognizedFaces(new ListUnmarshaller<ComparedFace>( ComparedFaceJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("OrientationCorrection")) { recognizeCelebritiesResult.setOrientationCorrection(StringJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return recognizeCelebritiesResult; }
/** * <p> * Details about each unrecognized face in the image. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setUnrecognizedFaces(java.util.Collection)} or {@link #withUnrecognizedFaces(java.util.Collection)} if * you want to override the existing values. * </p> * * @param unrecognizedFaces * Details about each unrecognized face in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces(ComparedFace... unrecognizedFaces) { if (this.unrecognizedFaces == null) { setUnrecognizedFaces(new java.util.ArrayList<ComparedFace>(unrecognizedFaces.length)); } for (ComparedFace ele : unrecognizedFaces) { this.unrecognizedFaces.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecognizeCelebritiesResult == false) return false; RecognizeCelebritiesResult other = (RecognizeCelebritiesResult) obj; if (other.getCelebrityFaces() == null ^ this.getCelebrityFaces() == null) return false; if (other.getCelebrityFaces() != null && other.getCelebrityFaces().equals(this.getCelebrityFaces()) == false) return false; if (other.getUnrecognizedFaces() == null ^ this.getUnrecognizedFaces() == null) return false; if (other.getUnrecognizedFaces() != null && other.getUnrecognizedFaces().equals(this.getUnrecognizedFaces()) == false) return false; if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null) return false; if (other.getOrientationCorrection() != null && other.getOrientationCorrection().equals(this.getOrientationCorrection()) == false) return false; return true; }
/** * <p> * Details about each unrecognized face in the image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param unrecognizedFaces <p> * Details about each unrecognized face in the image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces( java.util.Collection<ComparedFace> unrecognizedFaces) { setUnrecognizedFaces(unrecognizedFaces); return this; }
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setCelebrityFaces(java.util.Collection)} or {@link #withCelebrityFaces(java.util.Collection)} if you want * to override the existing values. * </p> * * @param celebrityFaces * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities * in an image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withCelebrityFaces(Celebrity... celebrityFaces) { if (this.celebrityFaces == null) { setCelebrityFaces(new java.util.ArrayList<Celebrity>(celebrityFaces.length)); } for (Celebrity ele : celebrityFaces) { this.celebrityFaces.add(ele); } return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCelebrityFaces() != null) sb.append("CelebrityFaces: ").append(getCelebrityFaces()).append(","); if (getUnrecognizedFaces() != null) sb.append("UnrecognizedFaces: ").append(getUnrecognizedFaces()).append(","); if (getOrientationCorrection() != null) sb.append("OrientationCorrection: ").append(getOrientationCorrection()); sb.append("}"); return sb.toString(); }
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can * detect a maximum of 15 celebrities in an image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param celebrityFaces <p> * Details about each celebrity found in the image. Amazon * Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withCelebrityFaces( java.util.Collection<Celebrity> celebrityFaces) { setCelebrityFaces(celebrityFaces); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCelebrityFaces() == null) ? 0 : getCelebrityFaces().hashCode()); hashCode = prime * hashCode + ((getUnrecognizedFaces() == null) ? 0 : getUnrecognizedFaces().hashCode()); hashCode = prime * hashCode + ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecognizeCelebritiesResult == false) return false; RecognizeCelebritiesResult other = (RecognizeCelebritiesResult) obj; if (other.getCelebrityFaces() == null ^ this.getCelebrityFaces() == null) return false; if (other.getCelebrityFaces() != null && other.getCelebrityFaces().equals(this.getCelebrityFaces()) == false) return false; if (other.getUnrecognizedFaces() == null ^ this.getUnrecognizedFaces() == null) return false; if (other.getUnrecognizedFaces() != null && other.getUnrecognizedFaces().equals(this.getUnrecognizedFaces()) == false) return false; if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null) return false; if (other.getOrientationCorrection() != null && other.getOrientationCorrection().equals(this.getOrientationCorrection()) == false) return false; return true; } }
/** * 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 (getCelebrityFaces() != null) sb.append("CelebrityFaces: " + getCelebrityFaces() + ","); if (getUnrecognizedFaces() != null) sb.append("UnrecognizedFaces: " + getUnrecognizedFaces() + ","); if (getOrientationCorrection() != null) sb.append("OrientationCorrection: " + getOrientationCorrection()); sb.append("}"); return sb.toString(); }