@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateSnapshotRequest == false) return false; CreateSnapshotRequest other = (CreateSnapshotRequest) obj; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; return true; }
public Request<CreateSnapshotRequest> marshall(CreateSnapshotRequest createSnapshotRequest) { if (createSnapshotRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } Request<CreateSnapshotRequest> request = new DefaultRequest<CreateSnapshotRequest>(createSnapshotRequest, "AmazonEC2"); request.addParameter("Action", "CreateSnapshot"); request.addParameter("Version", "2012-06-01"); if (createSnapshotRequest.getVolumeId() != null) { request.addParameter("VolumeId", StringUtils.fromString(createSnapshotRequest.getVolumeId())); } if (createSnapshotRequest.getDescription() != null) { request.addParameter( "Description", StringUtils.fromString(createSnapshotRequest.getDescription())); } return request; }