public StreamInfo unmarshall(JsonUnmarshallerContext context) throws Exception { StreamInfo streamInfo = new StreamInfo(); if (context.testExpression("streamId", targetDepth)) { context.nextToken(); streamInfo.setStreamId(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setStreamArn(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setStreamVersion(context.getUnmarshaller(Integer.class).unmarshall(context)); streamInfo.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setFiles(new ListUnmarshaller<StreamFile>(StreamFileJsonUnmarshaller.getInstance()).unmarshall(context)); streamInfo.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); streamInfo.setLastUpdatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); streamInfo.setRoleArn(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 DescribeStreamResult == false) return false; DescribeStreamResult other = (DescribeStreamResult) obj; if (other.getStreamInfo() == null ^ this.getStreamInfo() == null) return false; if (other.getStreamInfo() != null && other.getStreamInfo().equals(this.getStreamInfo()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode()); hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode()); hashCode = prime * hashCode + ((getStreamVersion() == null) ? 0 : getStreamVersion().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; }
/** * <p> * The files to stream. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param files <p> * The files to stream. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withFiles(StreamFile... files) { if (getFiles() == null) { this.files = new java.util.ArrayList<StreamFile>(files.length); } for (StreamFile value : files) { this.files.add(value); } return this; }
/** * <p> * The files to stream. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param files <p> * The files to stream. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withFiles(StreamFile... files) { if (getFiles() == null) { this.files = new java.util.ArrayList<StreamFile>(files.length); } for (StreamFile value : files) { this.files.add(value); } return this; }
return false; StreamInfo other = (StreamInfo) obj; if (other.getStreamId() == null ^ this.getStreamId() == null) return false; if (other.getStreamId() != null && other.getStreamId().equals(this.getStreamId()) == false) return false; if (other.getStreamArn() == null ^ this.getStreamArn() == null) return false; if (other.getStreamArn() != null && other.getStreamArn().equals(this.getStreamArn()) == false) return false; if (other.getStreamVersion() == null ^ this.getStreamVersion() == null) return false; if (other.getStreamVersion() != null && other.getStreamVersion().equals(this.getStreamVersion()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getFiles() == null ^ this.getFiles() == null) return false; if (other.getFiles() != null && other.getFiles().equals(this.getFiles()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null) return false; if (other.getLastUpdatedAt() != null && other.getLastUpdatedAt().equals(this.getLastUpdatedAt()) == false)
StreamInfo streamInfo = new StreamInfo(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("streamId")) { streamInfo.setStreamId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("streamArn")) { streamInfo.setStreamArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("streamVersion")) { streamInfo.setStreamVersion(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("description")) { streamInfo.setDescription(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("files")) { streamInfo.setFiles(new ListUnmarshaller<StreamFile>(StreamFileJsonUnmarshaller .getInstance() streamInfo.setCreatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("lastUpdatedAt")) { streamInfo.setLastUpdatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("roleArn")) { streamInfo.setRoleArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeStreamResult == false) return false; DescribeStreamResult other = (DescribeStreamResult) obj; if (other.getStreamInfo() == null ^ this.getStreamInfo() == null) return false; if (other.getStreamInfo() != null && other.getStreamInfo().equals(this.getStreamInfo()) == false) return false; return true; } }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStreamId() != null) sb.append("StreamId: ").append(getStreamId()).append(","); if (getStreamArn() != null) sb.append("StreamArn: ").append(getStreamArn()).append(","); if (getStreamVersion() != null) sb.append("StreamVersion: ").append(getStreamVersion()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getFiles() != null) sb.append("Files: ").append(getFiles()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getLastUpdatedAt() != null) sb.append("LastUpdatedAt: ").append(getLastUpdatedAt()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()); sb.append("}"); return sb.toString();
StreamInfo streamInfo = new StreamInfo(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("streamId")) { streamInfo.setStreamId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("streamArn")) { streamInfo.setStreamArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("streamVersion")) { streamInfo.setStreamVersion(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("description")) { streamInfo.setDescription(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("files")) { streamInfo.setFiles(new ListUnmarshaller<StreamFile>(StreamFileJsonUnmarshaller .getInstance() streamInfo.setCreatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("lastUpdatedAt")) { streamInfo.setLastUpdatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("roleArn")) { streamInfo.setRoleArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeStreamResult == false) return false; DescribeStreamResult other = (DescribeStreamResult) obj; if (other.getStreamInfo() == null ^ this.getStreamInfo() == null) return false; if (other.getStreamInfo() != null && other.getStreamInfo().equals(this.getStreamInfo()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(StreamInfo streamInfo, ProtocolMarshaller protocolMarshaller) { if (streamInfo == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(streamInfo.getStreamId(), STREAMID_BINDING); protocolMarshaller.marshall(streamInfo.getStreamArn(), STREAMARN_BINDING); protocolMarshaller.marshall(streamInfo.getStreamVersion(), STREAMVERSION_BINDING); protocolMarshaller.marshall(streamInfo.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(streamInfo.getFiles(), FILES_BINDING); protocolMarshaller.marshall(streamInfo.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(streamInfo.getLastUpdatedAt(), LASTUPDATEDAT_BINDING); protocolMarshaller.marshall(streamInfo.getRoleArn(), ROLEARN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
public StreamInfo unmarshall(JsonUnmarshallerContext context) throws Exception { StreamInfo streamInfo = new StreamInfo(); if (context.testExpression("streamId", targetDepth)) { context.nextToken(); streamInfo.setStreamId(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setStreamArn(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setStreamVersion(context.getUnmarshaller(Integer.class).unmarshall(context)); streamInfo.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); streamInfo.setFiles(new ListUnmarshaller<StreamFile>(StreamFileJsonUnmarshaller.getInstance()).unmarshall(context)); streamInfo.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); streamInfo.setLastUpdatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); streamInfo.setRoleArn(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 DescribeStreamResult == false) return false; DescribeStreamResult other = (DescribeStreamResult) obj; if (other.getStreamInfo() == null ^ this.getStreamInfo() == null) return false; if (other.getStreamInfo() != null && other.getStreamInfo().equals(this.getStreamInfo()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode()); hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode()); hashCode = prime * hashCode + ((getStreamVersion() == null) ? 0 : getStreamVersion().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().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 (getStreamId() != null) sb.append("streamId: " + getStreamId() + ","); if (getStreamArn() != null) sb.append("streamArn: " + getStreamArn() + ","); if (getStreamVersion() != null) sb.append("streamVersion: " + getStreamVersion() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getFiles() != null) sb.append("files: " + getFiles() + ","); if (getCreatedAt() != null) sb.append("createdAt: " + getCreatedAt() + ","); if (getLastUpdatedAt() != null) sb.append("lastUpdatedAt: " + getLastUpdatedAt() + ","); if (getRoleArn() != null) sb.append("roleArn: " + getRoleArn()); sb.append("}"); return sb.toString(); }
if (other.getStreamId() == null ^ this.getStreamId() == null) return false; if (other.getStreamId() != null && other.getStreamId().equals(this.getStreamId()) == false) return false; if (other.getStreamArn() == null ^ this.getStreamArn() == null) return false; if (other.getStreamArn() != null && other.getStreamArn().equals(this.getStreamArn()) == false) return false; if (other.getStreamVersion() == null ^ this.getStreamVersion() == null) return false; if (other.getStreamVersion() != null && other.getStreamVersion().equals(this.getStreamVersion()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getFiles() == null ^ this.getFiles() == null) return false; if (other.getFiles() != null && other.getFiles().equals(this.getFiles()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null)
public void marshall(StreamInfo streamInfo, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (streamInfo.getStreamId() != null) { String streamId = streamInfo.getStreamId(); jsonWriter.name("streamId"); jsonWriter.value(streamId); if (streamInfo.getStreamArn() != null) { String streamArn = streamInfo.getStreamArn(); jsonWriter.name("streamArn"); jsonWriter.value(streamArn); if (streamInfo.getStreamVersion() != null) { Integer streamVersion = streamInfo.getStreamVersion(); jsonWriter.name("streamVersion"); jsonWriter.value(streamVersion); if (streamInfo.getDescription() != null) { String description = streamInfo.getDescription(); jsonWriter.name("description"); jsonWriter.value(description); if (streamInfo.getFiles() != null) { java.util.List<StreamFile> files = streamInfo.getFiles(); jsonWriter.name("files"); jsonWriter.beginArray(); if (streamInfo.getCreatedAt() != null) { java.util.Date createdAt = streamInfo.getCreatedAt(); jsonWriter.name("createdAt");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode()); hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode()); hashCode = prime * hashCode + ((getStreamVersion() == null) ? 0 : getStreamVersion().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode()); hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode()); hashCode = prime * hashCode + ((getStreamVersion() == null) ? 0 : getStreamVersion().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; }