response.setDescribeAvailabilityZonesResponse(param1);
return response;
}
public static AttachVolumeResponse toAttachVolumeResponse(EC2Volume engineResponse) {
AttachVolumeResponse response = new AttachVolumeResponse();
AttachVolumeResponseType param1 = new AttachVolumeResponseType();
Calendar cal = Calendar.getInstance();
// -> if the instanceId was not given in the request then we have no way to get it
param1.setVolumeId(engineResponse.getId().toString());
param1.setInstanceId(engineResponse.getInstanceId().toString());
param1.setDevice(engineResponse.getDevice());
param1.setStatus(engineResponse.getAttachmentState());
param1.setAttachTime(cal);
param1.setRequestId(UUID.randomUUID().toString());
response.setAttachVolumeResponse(param1);
return response;
}