return response;
}
public static StartInstancesResponse toStartInstancesResponse(EC2StartInstancesResponse engineResponse) {
StartInstancesResponse response = new StartInstancesResponse();
StartInstancesResponseType param1 = new StartInstancesResponseType();
InstanceStateChangeSetType param2 = new InstanceStateChangeSetType();
EC2Instance[] instances = engineResponse.getInstanceSet();
for (int i = 0; i < instances.length; i++) {
InstanceStateChangeType param3 = new InstanceStateChangeType();
param3.setInstanceId(instances[i].getId());
InstanceStateType param4 = new InstanceStateType();
param4.setCode(toAmazonCode(instances[i].getState()));
param4.setName(toAmazonStateName(instances[i].getState()));
param3.setCurrentState(param4);
InstanceStateType param5 = new InstanceStateType();
param5.setCode(toAmazonCode(instances[i].getPreviousState()));
param5.setName(toAmazonStateName(instances[i].getPreviousState()));
param3.setPreviousState(param5);
param2.addItem(param3);
}
param1.setRequestId(UUID.randomUUID().toString());
param1.setInstancesSet(param2);
response.setStartInstancesResponse(param1);
return response;
}