@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCollectionId() == null) ? 0 : getCollectionId().hashCode()); hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getMaxFaces() == null) ? 0 : getMaxFaces().hashCode()); hashCode = prime * hashCode + ((getFaceMatchThreshold() == null) ? 0 : getFaceMatchThreshold().hashCode()); return hashCode; }
/** * <p> * ID of the collection to search. * </p> * * @param collectionId * ID of the collection to search. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageRequest withCollectionId(String collectionId) { setCollectionId(collectionId); return this; }
/** * <p> * The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition * operations, passing base64-encoded image bytes is not supported. * </p> * * @param image * The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition * operations, passing base64-encoded image bytes is not supported. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageRequest withImage(Image image) { setImage(image); return this; }
/** * Constructs a new SearchFacesByImageRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param collectionId <p> * ID of the collection to search. * </p> * @param image <p> * The input image as base64-encoded bytes or an S3 object. If * you use the AWS CLI to call Amazon Rekognition operations, * passing base64-encoded image bytes is not supported. * </p> */ public SearchFacesByImageRequest(String collectionId, Image image) { setCollectionId(collectionId); setImage(image); }
/** * <p> * Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence * in the match. * </p> * * @param maxFaces * Maximum number of faces to return. The operation returns the maximum number of faces with the highest * confidence in the match. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageRequest withMaxFaces(Integer maxFaces) { setMaxFaces(maxFaces); return this; }
/** * <p> * (Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches * where confidence in matches is less than 70%. * </p> * * @param faceMatchThreshold * (Optional) Specifies the minimum confidence in the face match to return. For example, don't return any * matches where confidence in matches is less than 70%. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageRequest withFaceMatchThreshold(Float faceMatchThreshold) { setFaceMatchThreshold(faceMatchThreshold); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchFacesByImageRequest == false) return false; SearchFacesByImageRequest other = (SearchFacesByImageRequest) obj; if (other.getCollectionId() == null ^ this.getCollectionId() == null) return false; if (other.getCollectionId() != null && other.getCollectionId().equals(this.getCollectionId()) == false) return false; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMaxFaces() == null ^ this.getMaxFaces() == null) return false; if (other.getMaxFaces() != null && other.getMaxFaces().equals(this.getMaxFaces()) == false) return false; if (other.getFaceMatchThreshold() == null ^ this.getFaceMatchThreshold() == null) return false; if (other.getFaceMatchThreshold() != null && other.getFaceMatchThreshold().equals(this.getFaceMatchThreshold()) == false) return false; return true; }
/** * 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 (getCollectionId() != null) sb.append("CollectionId: ").append(getCollectionId()).append(","); if (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getMaxFaces() != null) sb.append("MaxFaces: ").append(getMaxFaces()).append(","); if (getFaceMatchThreshold() != null) sb.append("FaceMatchThreshold: ").append(getFaceMatchThreshold()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(SearchFacesByImageRequest searchFacesByImageRequest, ProtocolMarshaller protocolMarshaller) { if (searchFacesByImageRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(searchFacesByImageRequest.getCollectionId(), COLLECTIONID_BINDING); protocolMarshaller.marshall(searchFacesByImageRequest.getImage(), IMAGE_BINDING); protocolMarshaller.marshall(searchFacesByImageRequest.getMaxFaces(), MAXFACES_BINDING); protocolMarshaller.marshall(searchFacesByImageRequest.getFaceMatchThreshold(), FACEMATCHTHRESHOLD_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCollectionId() == null) ? 0 : getCollectionId().hashCode()); hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getMaxFaces() == null) ? 0 : getMaxFaces().hashCode()); hashCode = prime * hashCode + ((getFaceMatchThreshold() == null) ? 0 : getFaceMatchThreshold().hashCode()); return hashCode; }
/** * 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 (getCollectionId() != null) sb.append("CollectionId: " + getCollectionId() + ","); if (getImage() != null) sb.append("Image: " + getImage() + ","); if (getMaxFaces() != null) sb.append("MaxFaces: " + getMaxFaces() + ","); if (getFaceMatchThreshold() != null) sb.append("FaceMatchThreshold: " + getFaceMatchThreshold()); sb.append("}"); return sb.toString(); }
SearchFacesByImageRequest other = (SearchFacesByImageRequest) obj; if (other.getCollectionId() == null ^ this.getCollectionId() == null) return false; if (other.getCollectionId() != null && other.getCollectionId().equals(this.getCollectionId()) == false) return false; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMaxFaces() == null ^ this.getMaxFaces() == null) return false; if (other.getMaxFaces() != null && other.getMaxFaces().equals(this.getMaxFaces()) == false) return false; if (other.getFaceMatchThreshold() == null ^ this.getFaceMatchThreshold() == null) return false; if (other.getFaceMatchThreshold() != null && other.getFaceMatchThreshold().equals(this.getFaceMatchThreshold()) == false) return false; return true;
jsonWriter.beginObject(); if (searchFacesByImageRequest.getCollectionId() != null) { String collectionId = searchFacesByImageRequest.getCollectionId(); jsonWriter.name("CollectionId"); jsonWriter.value(collectionId); if (searchFacesByImageRequest.getImage() != null) { Image image = searchFacesByImageRequest.getImage(); jsonWriter.name("Image"); ImageJsonMarshaller.getInstance().marshall(image, jsonWriter); if (searchFacesByImageRequest.getMaxFaces() != null) { Integer maxFaces = searchFacesByImageRequest.getMaxFaces(); jsonWriter.name("MaxFaces"); jsonWriter.value(maxFaces); if (searchFacesByImageRequest.getFaceMatchThreshold() != null) { Float faceMatchThreshold = searchFacesByImageRequest.getFaceMatchThreshold(); jsonWriter.name("FaceMatchThreshold"); jsonWriter.value(faceMatchThreshold);