}
public static DescribeKeyPairsResponse toDescribeKeyPairs(final EC2DescribeKeyPairsResponse response) {
EC2SSHKeyPair[] keyPairs = response.getKeyPairSet();
DescribeKeyPairsResponseInfoType respInfoType = new DescribeKeyPairsResponseInfoType();
if (keyPairs != null && keyPairs.length > 0) {
for (final EC2SSHKeyPair key : keyPairs) {
DescribeKeyPairsResponseItemType respItemType = new DescribeKeyPairsResponseItemType();
respItemType.setKeyFingerprint(key.getFingerprint());
respItemType.setKeyName(key.getKeyName());
respInfoType.addItem(respItemType);
}
}
DescribeKeyPairsResponseType respType = new DescribeKeyPairsResponseType();
respType.setRequestId(UUID.randomUUID().toString());