@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBytes() == null) ? 0 : getBytes().hashCode()); hashCode = prime * hashCode + ((getS3Object() == null) ? 0 : getS3Object().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); return hashCode; }
/** * <p> * Blob of image bytes up to 5 MBs. * </p> * <p> * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. * </p> * <p> * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. * </p> * * @param bytes * Blob of image bytes up to 5 MBs. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withBytes(java.nio.ByteBuffer bytes) { setBytes(bytes); return this; }
public Image unmarshall(JsonUnmarshallerContext context) throws Exception { Image image = new Image(); if (context.testExpression("Bytes", targetDepth)) { context.nextToken(); image.setBytes(context.getUnmarshaller(java.nio.ByteBuffer.class).unmarshall(context)); image.setS3Object(S3ObjectJsonUnmarshaller.getInstance().unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecognizeCelebritiesRequest == false) return false; RecognizeCelebritiesRequest other = (RecognizeCelebritiesRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; return true; }
/** * <p> * Identifies an S3 object as the image source. * </p> * * @param s3Object * Identifies an S3 object as the image source. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withS3Object(S3Object s3Object) { setS3Object(s3Object); return this; }
public Image unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Image image = new Image(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Bytes")) { image.setBytes(ByteBufferJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("S3Object")) { image.setS3Object(S3ObjectJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return image; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectTextRequest == false) return false; DetectTextRequest other = (DetectTextRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Image == false) return false; Image other = (Image) obj; if (other.getBytes() == null ^ this.getBytes() == null) return false; if (other.getBytes() != null && other.getBytes().equals(this.getBytes()) == false) return false; if (other.getS3Object() == null ^ this.getS3Object() == null) return false; if (other.getS3Object() != null && other.getS3Object().equals(this.getS3Object()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectFacesRequest == false) return false; DetectFacesRequest other = (DetectFacesRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == 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 (getBytes() != null) sb.append("Bytes: ").append(getBytes()).append(","); if (getS3Object() != null) sb.append("S3Object: ").append(getS3Object()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceImage() == null) ? 0 : getSourceImage().hashCode()); hashCode = prime * hashCode + ((getTargetImage() == null) ? 0 : getTargetImage().hashCode()); hashCode = prime * hashCode + ((getSimilarityThreshold() == null) ? 0 : getSimilarityThreshold().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CompareFacesRequest == false) return false; CompareFacesRequest other = (CompareFacesRequest) obj; if (other.getSourceImage() == null ^ this.getSourceImage() == null) return false; if (other.getSourceImage() != null && other.getSourceImage().equals(this.getSourceImage()) == false) return false; if (other.getTargetImage() == null ^ this.getTargetImage() == null) return false; if (other.getTargetImage() != null && other.getTargetImage().equals(this.getTargetImage()) == false) return false; if (other.getSimilarityThreshold() == null ^ this.getSimilarityThreshold() == null) return false; if (other.getSimilarityThreshold() != null && other.getSimilarityThreshold().equals(this.getSimilarityThreshold()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Image image, ProtocolMarshaller protocolMarshaller) { if (image == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(image.getBytes(), BYTES_BINDING); protocolMarshaller.marshall(image.getS3Object(), S3OBJECT_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 + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectModerationLabelsRequest == false) return false; DetectModerationLabelsRequest other = (DetectModerationLabelsRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBytes() == null) ? 0 : getBytes().hashCode()); hashCode = prime * hashCode + ((getS3Object() == null) ? 0 : getS3Object().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getMinConfidence() == null) ? 0 : getMinConfidence().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectLabelsRequest == false) return false; DetectLabelsRequest other = (DetectLabelsRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMaxLabels() == null ^ this.getMaxLabels() == null) return false; if (other.getMaxLabels() != null && other.getMaxLabels().equals(this.getMaxLabels()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; return true; }