@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachTime() == null) ? 0 : getAttachTime().hashCode()); hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getDeleteOnTermination() == null) ? 0 : getDeleteOnTermination().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachment() == null) ? 0 : getAttachment().hashCode()); return hashCode; }
/** * <p> * The time stamp when the attachment initiated. * </p> * * @param attachTime * The time stamp when the attachment initiated. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeAttachment withAttachTime(java.util.Date attachTime) { setAttachTime(attachTime); return this; }
public VolumeAttachment unmarshall(StaxUnmarshallerContext context) throws Exception { VolumeAttachment volumeAttachment = new VolumeAttachment(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; volumeAttachment.setAttachTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; volumeAttachment.setDevice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setInstanceId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setState(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setVolumeId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setDeleteOnTermination(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getAttachTime() == null) ? 0 : getAttachTime().hashCode()); hashCode = prime * hashCode + ((isDeleteOnTermination() == null) ? 0 : isDeleteOnTermination().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttachVolumeResult == false) return false; AttachVolumeResult other = (AttachVolumeResult) obj; if (other.getAttachment() == null ^ this.getAttachment() == null) return false; if (other.getAttachment() != null && other.getAttachment().equals(this.getAttachment()) == false) return false; return true; }
/** * Wait until the first attachment has the desired state */ private TimedInterval waitForAttachmentState(String volumeId, VolumeAttachmentState desiredState, long timeout) { Stopwatch sw = createStarted(); Volume volume = getVolume(volumeId); List<VolumeAttachment> attachments = volume.getAttachments(); VolumeAttachment first = getSingleElement(attachments); VolumeAttachmentState currentState = VolumeAttachmentState.fromValue(first.getState()); while (!currentState.equals(desiredState)) { checkedWait(sw, timeout, SLEEP_MILLIS); volume = getVolume(volumeId); attachments = volume.getAttachments(); first = getSingleElement(attachments); currentState = VolumeAttachmentState.fromValue(first.getState()); } return TimedInterval.build(sw); }
/** * <p> * Indicates whether the EBS volume is deleted on instance termination. * </p> * * @param deleteOnTermination * Indicates whether the EBS volume is deleted on instance termination. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeAttachment withDeleteOnTermination(Boolean deleteOnTermination) { setDeleteOnTermination(deleteOnTermination); return this; }
public VolumeAttachment unmarshall(StaxUnmarshallerContext context) throws Exception { VolumeAttachment volumeAttachment = new VolumeAttachment(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; volumeAttachment.setVolumeId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setInstanceId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setDevice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setState(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setAttachTime(DateStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setDeleteOnTermination(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VolumeAttachment == false) return false; VolumeAttachment other = (VolumeAttachment)obj; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getDevice() == null ^ this.getDevice() == null) return false; if (other.getDevice() != null && other.getDevice().equals(this.getDevice()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getAttachTime() == null ^ this.getAttachTime() == null) return false; if (other.getAttachTime() != null && other.getAttachTime().equals(this.getAttachTime()) == false) return false; if (other.isDeleteOnTermination() == null ^ this.isDeleteOnTermination() == null) return false; if (other.isDeleteOnTermination() != null && other.isDeleteOnTermination().equals(this.isDeleteOnTermination()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetachVolumeResult == false) return false; DetachVolumeResult other = (DetachVolumeResult) obj; if (other.getAttachment() == null ^ this.getAttachment() == null) return false; if (other.getAttachment() != null && other.getAttachment().equals(this.getAttachment()) == false) return false; return true; }
/** * <p> * Indicates whether the EBS volume is deleted on instance termination. * </p> * * @param deleteOnTermination * Indicates whether the EBS volume is deleted on instance termination. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeAttachment withDeleteOnTermination(Boolean deleteOnTermination) { setDeleteOnTermination(deleteOnTermination); return this; }
return false; VolumeAttachment other = (VolumeAttachment) obj; if (other.getAttachTime() == null ^ this.getAttachTime() == null) return false; if (other.getAttachTime() != null && other.getAttachTime().equals(this.getAttachTime()) == false) return false; if (other.getDevice() == null ^ this.getDevice() == null) return false; if (other.getDevice() != null && other.getDevice().equals(this.getDevice()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getDeleteOnTermination() == null ^ this.getDeleteOnTermination() == null) return false; if (other.getDeleteOnTermination() != null && other.getDeleteOnTermination().equals(this.getDeleteOnTermination()) == false) return false; return true;
public VolumeAttachment unmarshall(StaxUnmarshallerContext context) throws Exception { VolumeAttachment volumeAttachment = new VolumeAttachment(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; volumeAttachment.setAttachTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; volumeAttachment.setDevice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setInstanceId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setState(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setVolumeId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; volumeAttachment.setDeleteOnTermination(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * 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 (getVolumeId() != null) sb.append("VolumeId: " + getVolumeId() + ","); if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ","); if (getDevice() != null) sb.append("Device: " + getDevice() + ","); if (getState() != null) sb.append("State: " + getState() + ","); if (getAttachTime() != null) sb.append("AttachTime: " + getAttachTime() + ","); if (isDeleteOnTermination() != null) sb.append("DeleteOnTermination: " + isDeleteOnTermination() ); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachment() == null) ? 0 : getAttachment().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetachVolumeResult == false) return false; DetachVolumeResult other = (DetachVolumeResult)obj; if (other.getAttachment() == null ^ this.getAttachment() == null) return false; if (other.getAttachment() != null && other.getAttachment().equals(this.getAttachment()) == false) return false; return true; }
/** * <p> * The time stamp when the attachment initiated. * </p> * * @param attachTime * The time stamp when the attachment initiated. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeAttachment withAttachTime(java.util.Date attachTime) { setAttachTime(attachTime); return this; }
/** * 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 (getAttachTime() != null) sb.append("AttachTime: ").append(getAttachTime()).append(","); if (getDevice() != null) sb.append("Device: ").append(getDevice()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getDeleteOnTermination() != null) sb.append("DeleteOnTermination: ").append(getDeleteOnTermination()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachment() == null) ? 0 : getAttachment().hashCode()); return hashCode; }