@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBucket() == null) ? 0 : getBucket().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getS3Object() == null) ? 0 : getS3Object().hashCode()); return hashCode; }
/** * <p> * Name of the S3 bucket. * </p> * * @param bucket * Name of the S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Object withBucket(String bucket) { setBucket(bucket); return this; }
public S3Object unmarshall(JsonUnmarshallerContext context) throws Exception { S3Object s3Object = new S3Object(); if (context.testExpression("Bucket", targetDepth)) { context.nextToken(); s3Object.setBucket(context.getUnmarshaller(String.class).unmarshall(context)); s3Object.setName(context.getUnmarshaller(String.class).unmarshall(context)); s3Object.setVersion(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Video == false) return false; Video other = (Video) obj; if (other.getS3Object() == null ^ this.getS3Object() == null) return false; if (other.getS3Object() != null && other.getS3Object().equals(this.getS3Object()) == false) return false; return true; }
/** * <p> * S3 object key name. * </p> * * @param name * S3 object key name. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Object withName(String name) { setName(name); return this; }
/** * <p> * If the bucket is versioning enabled, you can specify the object version. * </p> * * @param version * If the bucket is versioning enabled, you can specify the object version. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Object withVersion(String version) { setVersion(version); return this; }
public S3Object unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } S3Object s3Object = new S3Object(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Bucket")) { s3Object.setBucket(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Name")) { s3Object.setName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Version")) { s3Object.setVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return s3Object; }
@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 boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3Object == false) return false; S3Object other = (S3Object) obj; if (other.getBucket() == null ^ this.getBucket() == null) return false; if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == 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 boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Video == false) return false; Video other = (Video) obj; if (other.getS3Object() == null ^ this.getS3Object() == null) return false; if (other.getS3Object() != null && other.getS3Object().equals(this.getS3Object()) == 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 (getBucket() != null) sb.append("Bucket: ").append(getBucket()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getS3Object() == null) ? 0 : getS3Object().hashCode()); return hashCode; }
@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(S3Object s3Object, ProtocolMarshaller protocolMarshaller) { if (s3Object == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(s3Object.getBucket(), BUCKET_BINDING); protocolMarshaller.marshall(s3Object.getName(), NAME_BINDING); protocolMarshaller.marshall(s3Object.getVersion(), VERSION_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 + ((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 + ((getBucket() == null) ? 0 : getBucket().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3Object == false) return false; S3Object other = (S3Object) obj; if (other.getBucket() == null ^ this.getBucket() == null) return false; if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == 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 (getBucket() != null) sb.append("Bucket: " + getBucket() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getVersion() != null) sb.append("Version: " + getVersion()); sb.append("}"); return sb.toString(); }