public AlarmRepresentation create(AlarmRepresentation representation) throws SDKException {
return (AlarmRepresentation) restConnector.post(getAlarmsApiRepresentation().getAlarms().getSelf(), AlarmMediaType.ALARM, representation);
}
public PagedCollectionResource getAlarmsByFilter(AlarmFilter alarmFilter) throws SDKException {
CumulocityAlarmStatuses status = alarmFilter.getStatus();
ManagedObjectRepresentation source = alarmFilter.getSource();
Date dateFrom = alarmFilter.getFromDate();
Date dateTo = alarmFilter.getToDate();
Map filter = new HashMap();
if (null != status) {
filter.put(PARAMETER_STATUS, status.name());
}
if (null != source) {
filter.put(PARAMETER_SOURCE, source.getId().getValue());
}
if (null != dateFrom) {