@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); hashCode = prime * hashCode + ((getNoDevice() == null) ? 0 : getNoDevice().hashCode()); hashCode = prime * hashCode + ((getVirtualName() == null) ? 0 : getVirtualName().hashCode()); hashCode = prime * hashCode + ((getEbs() == null) ? 0 : getEbs().hashCode()); return hashCode; }
/** * 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 (getDeviceName() != null) sb.append("DeviceName: ").append(getDeviceName()).append(","); if (getNoDevice() != null) sb.append("NoDevice: ").append(getNoDevice()).append(","); if (getVirtualName() != null) sb.append("VirtualName: ").append(getVirtualName()).append(","); if (getEbs() != null) sb.append("Ebs: ").append(getEbs()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(BlockDeviceMapping blockDeviceMapping, ProtocolMarshaller protocolMarshaller) { if (blockDeviceMapping == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(blockDeviceMapping.getDeviceName(), DEVICENAME_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getNoDevice(), NODEVICE_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getVirtualName(), VIRTUALNAME_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getEbs(), EBS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BlockDeviceMapping == false) return false; BlockDeviceMapping other = (BlockDeviceMapping) obj; if (other.getDeviceName() == null ^ this.getDeviceName() == null) return false; if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false) return false; if (other.getNoDevice() == null ^ this.getNoDevice() == null) return false; if (other.getNoDevice() != null && other.getNoDevice().equals(this.getNoDevice()) == false) return false; if (other.getVirtualName() == null ^ this.getVirtualName() == null) return false; if (other.getVirtualName() != null && other.getVirtualName().equals(this.getVirtualName()) == false) return false; if (other.getEbs() == null ^ this.getEbs() == null) return false; if (other.getEbs() != null && other.getEbs().equals(this.getEbs()) == 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 (getDeviceName() != null) sb.append("DeviceName: ").append(getDeviceName()).append(","); if (getNoDevice() != null) sb.append("NoDevice: ").append(getNoDevice()).append(","); if (getVirtualName() != null) sb.append("VirtualName: ").append(getVirtualName()).append(","); if (getEbs() != null) sb.append("Ebs: ").append(getEbs()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); hashCode = prime * hashCode + ((getNoDevice() == null) ? 0 : getNoDevice().hashCode()); hashCode = prime * hashCode + ((getVirtualName() == null) ? 0 : getVirtualName().hashCode()); hashCode = prime * hashCode + ((getEbs() == null) ? 0 : getEbs().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(BlockDeviceMapping blockDeviceMapping, ProtocolMarshaller protocolMarshaller) { if (blockDeviceMapping == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(blockDeviceMapping.getDeviceName(), DEVICENAME_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getNoDevice(), NODEVICE_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getVirtualName(), VIRTUALNAME_BINDING); protocolMarshaller.marshall(blockDeviceMapping.getEbs(), EBS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BlockDeviceMapping == false) return false; BlockDeviceMapping other = (BlockDeviceMapping) obj; if (other.getDeviceName() == null ^ this.getDeviceName() == null) return false; if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false) return false; if (other.getNoDevice() == null ^ this.getNoDevice() == null) return false; if (other.getNoDevice() != null && other.getNoDevice().equals(this.getNoDevice()) == false) return false; if (other.getVirtualName() == null ^ this.getVirtualName() == null) return false; if (other.getVirtualName() != null && other.getVirtualName().equals(this.getVirtualName()) == false) return false; if (other.getEbs() == null ^ this.getEbs() == null) return false; if (other.getEbs() != null && other.getEbs().equals(this.getEbs()) == false) return false; return true; }