@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaces() == null) ? 0 : getFaces().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); return hashCode; }
/** * <p> * Version number of the face detection model associated with the input collection (<code>CollectionId</code>). * </p> * * @param faceModelVersion * Version number of the face detection model associated with the input collection (<code>CollectionId</code> * ). * @return Returns a reference to this object so that method calls can be chained together. */ public ListFacesResult withFaceModelVersion(String faceModelVersion) { setFaceModelVersion(faceModelVersion); return this; }
/** * <p> * An array of <code>Face</code> objects. * </p> * * @param faces * An array of <code>Face</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public ListFacesResult withFaces(java.util.Collection<Face> faces) { setFaces(faces); return this; }
public ListFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListFacesResult listFacesResult = new ListFacesResult(); if (context.testExpression("Faces", targetDepth)) { context.nextToken(); listFacesResult.setFaces(new ListUnmarshaller<Face>(FaceJsonUnmarshaller.getInstance()).unmarshall(context)); listFacesResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context)); listFacesResult.setFaceModelVersion(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * If the response is truncated, Amazon Rekognition returns this token that you can use in the subsequent request to * retrieve the next set of faces. * </p> * * @param nextToken * If the response is truncated, Amazon Rekognition returns this token that you can use in the subsequent * request to retrieve the next set of faces. * @return Returns a reference to this object so that method calls can be chained together. */ public ListFacesResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
/** * <p> * An array of <code>Face</code> objects. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faces <p> * An array of <code>Face</code> objects. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListFacesResult withFaces(Face... faces) { if (getFaces() == null) { this.faces = new java.util.ArrayList<Face>(faces.length); } for (Face value : faces) { this.faces.add(value); } return this; }
public ListFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListFacesResult listFacesResult = new ListFacesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Faces")) { listFacesResult.setFaces(new ListUnmarshaller<Face>(FaceJsonUnmarshaller .getInstance() ) .unmarshall(context)); } else if (name.equals("NextToken")) { listFacesResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceModelVersion")) { listFacesResult.setFaceModelVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listFacesResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListFacesResult == false) return false; ListFacesResult other = (ListFacesResult) obj; if (other.getFaces() == null ^ this.getFaces() == null) return false; if (other.getFaces() != null && other.getFaces().equals(this.getFaces()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == false) return false; return true; }
/** * <p> * An array of <code>Face</code> objects. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaces(java.util.Collection)} or {@link #withFaces(java.util.Collection)} if you want to override the * existing values. * </p> * * @param faces * An array of <code>Face</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public ListFacesResult withFaces(Face... faces) { if (this.faces == null) { setFaces(new java.util.ArrayList<Face>(faces.length)); } for (Face ele : faces) { this.faces.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 (getFaces() != null) sb.append("Faces: ").append(getFaces()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getFaceModelVersion() != null) sb.append("FaceModelVersion: ").append(getFaceModelVersion()); sb.append("}"); return sb.toString(); }
/** * <p> * An array of <code>Face</code> objects. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faces <p> * An array of <code>Face</code> objects. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListFacesResult withFaces(java.util.Collection<Face> faces) { setFaces(faces); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaces() == null) ? 0 : getFaces().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListFacesResult == false) return false; ListFacesResult other = (ListFacesResult) obj; if (other.getFaces() == null ^ this.getFaces() == null) return false; if (other.getFaces() != null && other.getFaces().equals(this.getFaces()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == 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 (getFaces() != null) sb.append("Faces: " + getFaces() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getFaceModelVersion() != null) sb.append("FaceModelVersion: " + getFaceModelVersion()); sb.append("}"); return sb.toString(); }