/** * 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 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; }
/** * 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); } }
/** * 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 (getBytes() != null) sb.append("Bytes: " + getBytes() + ","); if (getS3Object() != null) sb.append("S3Object: " + getS3Object()); sb.append("}"); return sb.toString(); }
@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; } }
public void marshall(Image image, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (image.getBytes() != null) { java.nio.ByteBuffer bytes = image.getBytes(); jsonWriter.name("Bytes"); jsonWriter.value(bytes); } if (image.getS3Object() != null) { S3Object s3Object = image.getS3Object(); jsonWriter.name("S3Object"); S3ObjectJsonMarshaller.getInstance().marshall(s3Object, jsonWriter); } jsonWriter.endObject(); }