@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getEc2VolumeId() == null) ? 0 : getEc2VolumeId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRaidArrayId() == null) ? 0 : getRaidArrayId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); hashCode = prime * hashCode + ((getMountPoint() == null) ? 0 : getMountPoint().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode()); return hashCode; }
public Volume unmarshall(JsonUnmarshallerContext context) throws Exception { Volume volume = new Volume(); if (context.testExpression("VolumeId", targetDepth)) { context.nextToken(); volume.setVolumeId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setEc2VolumeId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setName(context.getUnmarshaller(String.class).unmarshall(context)); volume.setRaidArrayId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setInstanceId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); volume.setSize(context.getUnmarshaller(Integer.class).unmarshall(context)); volume.setDevice(context.getUnmarshaller(String.class).unmarshall(context)); volume.setMountPoint(context.getUnmarshaller(String.class).unmarshall(context)); volume.setRegion(context.getUnmarshaller(String.class).unmarshall(context)); volume.setAvailabilityZone(context.getUnmarshaller(String.class).unmarshall(context)); volume.setVolumeType(context.getUnmarshaller(String.class).unmarshall(context)); volume.setIops(context.getUnmarshaller(Integer.class).unmarshall(context));
public Volume unmarshall(JsonUnmarshallerContext context) throws Exception { Volume volume = new Volume(); if (context.testExpression("VolumeId", targetDepth)) { context.nextToken(); volume.setVolumeId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setEc2VolumeId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setName(context.getUnmarshaller(String.class).unmarshall(context)); volume.setRaidArrayId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setInstanceId(context.getUnmarshaller(String.class).unmarshall(context)); volume.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); volume.setSize(context.getUnmarshaller(Integer.class).unmarshall(context)); volume.setDevice(context.getUnmarshaller(String.class).unmarshall(context)); volume.setMountPoint(context.getUnmarshaller(String.class).unmarshall(context)); volume.setRegion(context.getUnmarshaller(String.class).unmarshall(context)); volume.setAvailabilityZone(context.getUnmarshaller(String.class).unmarshall(context)); volume.setVolumeType(context.getUnmarshaller(String.class).unmarshall(context)); volume.setIops(context.getUnmarshaller(Integer.class).unmarshall(context));
return false; Volume other = (Volume) obj; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getEc2VolumeId() == null ^ this.getEc2VolumeId() == null) return false; if (other.getEc2VolumeId() != null && other.getEc2VolumeId().equals(this.getEc2VolumeId()) == 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.getRaidArrayId() == null ^ this.getRaidArrayId() == null) return false; if (other.getRaidArrayId() != null && other.getRaidArrayId().equals(this.getRaidArrayId()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getEc2VolumeId() != null) sb.append("Ec2VolumeId: ").append(getEc2VolumeId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getRaidArrayId() != null) sb.append("RaidArrayId: ").append(getRaidArrayId()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSize() != null) sb.append("Size: ").append(getSize()).append(","); if (getDevice() != null) sb.append("Device: ").append(getDevice()).append(","); if (getMountPoint() != null) sb.append("MountPoint: ").append(getMountPoint()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getIops() != null) sb.append("Iops: ").append(getIops()).append(","); if (getEncrypted() != null)
/** * Marshall the given parameter object. */ public void marshall(Volume volume, ProtocolMarshaller protocolMarshaller) { if (volume == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(volume.getVolumeId(), VOLUMEID_BINDING); protocolMarshaller.marshall(volume.getEc2VolumeId(), EC2VOLUMEID_BINDING); protocolMarshaller.marshall(volume.getName(), NAME_BINDING); protocolMarshaller.marshall(volume.getRaidArrayId(), RAIDARRAYID_BINDING); protocolMarshaller.marshall(volume.getInstanceId(), INSTANCEID_BINDING); protocolMarshaller.marshall(volume.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(volume.getSize(), SIZE_BINDING); protocolMarshaller.marshall(volume.getDevice(), DEVICE_BINDING); protocolMarshaller.marshall(volume.getMountPoint(), MOUNTPOINT_BINDING); protocolMarshaller.marshall(volume.getRegion(), REGION_BINDING); protocolMarshaller.marshall(volume.getAvailabilityZone(), AVAILABILITYZONE_BINDING); protocolMarshaller.marshall(volume.getVolumeType(), VOLUMETYPE_BINDING); protocolMarshaller.marshall(volume.getIops(), IOPS_BINDING); protocolMarshaller.marshall(volume.getEncrypted(), ENCRYPTED_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 + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getEc2VolumeId() == null) ? 0 : getEc2VolumeId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRaidArrayId() == null) ? 0 : getRaidArrayId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); hashCode = prime * hashCode + ((getMountPoint() == null) ? 0 : getMountPoint().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode()); return hashCode; }
return false; Volume other = (Volume) obj; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getEc2VolumeId() == null ^ this.getEc2VolumeId() == null) return false; if (other.getEc2VolumeId() != null && other.getEc2VolumeId().equals(this.getEc2VolumeId()) == 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.getRaidArrayId() == null ^ this.getRaidArrayId() == null) return false; if (other.getRaidArrayId() != null && other.getRaidArrayId().equals(this.getRaidArrayId()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getEc2VolumeId() != null) sb.append("Ec2VolumeId: ").append(getEc2VolumeId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getRaidArrayId() != null) sb.append("RaidArrayId: ").append(getRaidArrayId()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSize() != null) sb.append("Size: ").append(getSize()).append(","); if (getDevice() != null) sb.append("Device: ").append(getDevice()).append(","); if (getMountPoint() != null) sb.append("MountPoint: ").append(getMountPoint()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getIops() != null) sb.append("Iops: ").append(getIops()).append(","); if (getEncrypted() != null)
/** * Marshall the given parameter object. */ public void marshall(Volume volume, ProtocolMarshaller protocolMarshaller) { if (volume == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(volume.getVolumeId(), VOLUMEID_BINDING); protocolMarshaller.marshall(volume.getEc2VolumeId(), EC2VOLUMEID_BINDING); protocolMarshaller.marshall(volume.getName(), NAME_BINDING); protocolMarshaller.marshall(volume.getRaidArrayId(), RAIDARRAYID_BINDING); protocolMarshaller.marshall(volume.getInstanceId(), INSTANCEID_BINDING); protocolMarshaller.marshall(volume.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(volume.getSize(), SIZE_BINDING); protocolMarshaller.marshall(volume.getDevice(), DEVICE_BINDING); protocolMarshaller.marshall(volume.getMountPoint(), MOUNTPOINT_BINDING); protocolMarshaller.marshall(volume.getRegion(), REGION_BINDING); protocolMarshaller.marshall(volume.getAvailabilityZone(), AVAILABILITYZONE_BINDING); protocolMarshaller.marshall(volume.getVolumeType(), VOLUMETYPE_BINDING); protocolMarshaller.marshall(volume.getIops(), IOPS_BINDING); protocolMarshaller.marshall(volume.getEncrypted(), ENCRYPTED_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }