@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 + ((getExternalImageId() == null) ? 0 : getExternalImageId().hashCode()); hashCode = prime * hashCode + ((getDetectionAttributes() == null) ? 0 : getDetectionAttributes().hashCode()); hashCode = prime * hashCode + ((getMaxFaces() == null) ? 0 : getMaxFaces().hashCode()); hashCode = prime * hashCode + ((getQualityFilter() == null) ? 0 : getQualityFilter().hashCode()); return hashCode; }
/** * <p> * The ID of an existing collection to which you want to add the faces that are detected in the input images. * </p> * * @param collectionId * The ID of an existing collection to which you want to add the faces that are detected in the input images. * @return Returns a reference to this object so that method calls can be chained together. */ public IndexFacesRequest withCollectionId(String collectionId) { setCollectionId(collectionId); return this; }
/** * <p> * An array of facial attributes that you want to be returned. This can be the default list of attributes or all * attributes. If you don't specify a value for <code>Attributes</code> or if you specify <code>["DEFAULT"]</code>, * the API returns the following subset of facial attributes: <code>BoundingBox</code>, <code>Confidence</code>, * <code>Pose</code>, <code>Quality</code>, and <code>Landmarks</code>. If you provide <code>["ALL"]</code>, all * facial attributes are returned, but the operation takes longer to complete. * </p> * <p> * If you provide both, <code>["ALL", "DEFAULT"]</code>, the service uses a logical AND operator to determine which * attributes to return (in this case, all attributes). * </p> * * @param detectionAttributes * An array of facial attributes that you want to be returned. This can be the default list of attributes or * all attributes. If you don't specify a value for <code>Attributes</code> or if you specify * <code>["DEFAULT"]</code>, the API returns the following subset of facial attributes: * <code>BoundingBox</code>, <code>Confidence</code>, <code>Pose</code>, <code>Quality</code>, and * <code>Landmarks</code>. If you provide <code>["ALL"]</code>, all facial attributes are returned, but the * operation takes longer to complete.</p> * <p> * If you provide both, <code>["ALL", "DEFAULT"]</code>, the service uses a logical AND operator to determine * which attributes to return (in this case, all attributes). * @return Returns a reference to this object so that method calls can be chained together. * @see Attribute */ public IndexFacesRequest withDetectionAttributes(java.util.Collection<String> detectionAttributes) { setDetectionAttributes(detectionAttributes); return this; }
@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 + ((getExternalImageId() == null) ? 0 : getExternalImageId().hashCode()); hashCode = prime * hashCode + ((getDetectionAttributes() == null) ? 0 : getDetectionAttributes().hashCode()); return hashCode; }
detectionAttributesCopy.add(value.toString()); if (getDetectionAttributes() == null) { setDetectionAttributes(detectionAttributesCopy); } else { getDetectionAttributes().addAll(detectionAttributesCopy);
/** * Constructs a new IndexFacesRequest object. Callers should use the setter * or fluent setter (with...) methods to initialize any additional object * members. * * @param collectionId <p> * The ID of an existing collection to which you want to add the * faces that are detected in the input images. * </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 IndexFacesRequest(String collectionId, Image image) { setCollectionId(collectionId); setImage(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 isn't 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 isn't supported. * @return Returns a reference to this object so that method calls can be chained together. */ public IndexFacesRequest withImage(Image image) { setImage(image); return this; }
if (getDetectionAttributes() == null) { this.detectionAttributes = new java.util.ArrayList<String>(detectionAttributes.length);
/** * <p> * The ID you want to assign to all the faces detected in the image. * </p> * * @param externalImageId * The ID you want to assign to all the faces detected in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public IndexFacesRequest withExternalImageId(String externalImageId) { setExternalImageId(externalImageId); return this; }
IndexFacesRequest other = (IndexFacesRequest) 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.getExternalImageId() == null ^ this.getExternalImageId() == null) return false; if (other.getExternalImageId() != null && other.getExternalImageId().equals(this.getExternalImageId()) == false) return false; if (other.getDetectionAttributes() == null ^ this.getDetectionAttributes() == null) return false; if (other.getDetectionAttributes() != null && other.getDetectionAttributes().equals(this.getDetectionAttributes()) == false) return false; return true;
return false; IndexFacesRequest other = (IndexFacesRequest) 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.getExternalImageId() == null ^ this.getExternalImageId() == null) return false; if (other.getExternalImageId() != null && other.getExternalImageId().equals(this.getExternalImageId()) == false) return false; if (other.getDetectionAttributes() == null ^ this.getDetectionAttributes() == null) return false; if (other.getDetectionAttributes() != null && other.getDetectionAttributes().equals(this.getDetectionAttributes()) == 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.getQualityFilter() == null ^ this.getQualityFilter() == null) return false; if (other.getQualityFilter() != null && other.getQualityFilter().equals(this.getQualityFilter()) == 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 (getCollectionId() != null) sb.append("CollectionId: " + getCollectionId() + ","); if (getImage() != null) sb.append("Image: " + getImage() + ","); if (getExternalImageId() != null) sb.append("ExternalImageId: " + getExternalImageId() + ","); if (getDetectionAttributes() != null) sb.append("DetectionAttributes: " + getDetectionAttributes()); sb.append("}"); return sb.toString(); }
setDetectionAttributes(new java.util.ArrayList<String>(detectionAttributes.length));
/** * 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 (getExternalImageId() != null) sb.append("ExternalImageId: ").append(getExternalImageId()).append(","); if (getDetectionAttributes() != null) sb.append("DetectionAttributes: ").append(getDetectionAttributes()).append(","); if (getMaxFaces() != null) sb.append("MaxFaces: ").append(getMaxFaces()).append(","); if (getQualityFilter() != null) sb.append("QualityFilter: ").append(getQualityFilter()); sb.append("}"); return sb.toString(); }
jsonWriter.beginObject(); if (indexFacesRequest.getCollectionId() != null) { String collectionId = indexFacesRequest.getCollectionId(); jsonWriter.name("CollectionId"); jsonWriter.value(collectionId); if (indexFacesRequest.getImage() != null) { Image image = indexFacesRequest.getImage(); jsonWriter.name("Image"); ImageJsonMarshaller.getInstance().marshall(image, jsonWriter); if (indexFacesRequest.getExternalImageId() != null) { String externalImageId = indexFacesRequest.getExternalImageId(); jsonWriter.name("ExternalImageId"); jsonWriter.value(externalImageId); if (indexFacesRequest.getDetectionAttributes() != null) { java.util.List<String> detectionAttributes = indexFacesRequest .getDetectionAttributes(); jsonWriter.name("DetectionAttributes"); jsonWriter.beginArray();
setDetectionAttributes(detectionAttributes); return this;
/** * Marshall the given parameter object. */ public void marshall(IndexFacesRequest indexFacesRequest, ProtocolMarshaller protocolMarshaller) { if (indexFacesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(indexFacesRequest.getCollectionId(), COLLECTIONID_BINDING); protocolMarshaller.marshall(indexFacesRequest.getImage(), IMAGE_BINDING); protocolMarshaller.marshall(indexFacesRequest.getExternalImageId(), EXTERNALIMAGEID_BINDING); protocolMarshaller.marshall(indexFacesRequest.getDetectionAttributes(), DETECTIONATTRIBUTES_BINDING); protocolMarshaller.marshall(indexFacesRequest.getMaxFaces(), MAXFACES_BINDING); protocolMarshaller.marshall(indexFacesRequest.getQualityFilter(), QUALITYFILTER_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }