if (stopPoints != null
&& !CollectionsLibrary.isEmpty(stopPoints.getAffectedStopPoint())) {
for (AffectedStopPointStructure stopPoint : stopPoints.getAffectedStopPoint()) {
StopPointRefStructure stopRef = stopPoint.getStopPointRef();
if (stopRef == null || stopRef.getValue() == null)
continue;
AgencyAndId stopId = AgencyAndIdLibrary.convertFromString(stopRef.getValue());
Id id = ServiceAlertLibrary.id(stopId);
Affects.Builder affects = Affects.newBuilder();
affects.setStopId(id);
serviceAlert.addAffects(affects);
}