}
@Override
public DescribeAddressesResponse describeAddresses(DescribeAddresses describeAddresses) {
EC2DescribeAddresses ec2Request = new EC2DescribeAddresses();
DescribeAddressesType dat = describeAddresses.getDescribeAddresses();
DescribeAddressesInfoType dait = dat.getPublicIpsSet();
DescribeAddressesItemType[] items = dait.getItem();
if (items != null) { // -> can be empty
for (DescribeAddressesItemType itemType : items)
ec2Request.addPublicIp(itemType.getPublicIp());
}
FilterSetType fset = dat.getFilterSet();
if (fset != null) {
ec2Request.setFilterSet(toAddressFilterSet(fset));
}
return toDescribeAddressesResponse(engine.describeAddresses(ec2Request));