response.setAttachVolumeResponse(param1);
return response;
}
public static DetachVolumeResponse toDetachVolumeResponse(EC2Volume engineResponse) {
DetachVolumeResponse response = new DetachVolumeResponse();
DetachVolumeResponseType param1 = new DetachVolumeResponseType();
Calendar cal = Calendar.getInstance();
cal.set(1970, 1, 1); // return one value, Unix Epoch, what else can we return?
param1.setVolumeId(engineResponse.getId().toString());
param1.setInstanceId((null == engineResponse.getInstanceId() ? "" : engineResponse.getInstanceId().toString()));
param1.setDevice((null == engineResponse.getDevice() ? "" : engineResponse.getDevice()));
param1.setStatus(engineResponse.getAttachmentState());
param1.setAttachTime(cal);
param1.setRequestId(UUID.randomUUID().toString());
response.setDetachVolumeResponse(param1);
return response;
}