package com.hpcloud.maas.domain.model;

import com.fasterxml.jackson.annotation.JsonRootName;
import com.hpcloud.maas.common.model.alarm.AlarmState;

/**
 * Represents an alarm state transition having occurred.
 * 
 * @author Jonathan Halterman
 */
@JsonRootName(value = "alarm-transitioned")
public class AlarmStateTransitionEvent {
  public String tenantId;
  public String alarmId;
  public String alarmName;
  public AlarmState oldState;
  public AlarmState newState;
  public String stateChangeReason;
  public long timestamp;

  public AlarmStateTransitionEvent() {
  }

  public AlarmStateTransitionEvent(String tenantId, String alarmId, String alarmName,
      AlarmState oldState, AlarmState newState, String stateChangeReason, long timestamp) {
    this.tenantId = tenantId;
    this.alarmId = alarmId;
    this.alarmName = alarmName;
    this.oldState = oldState;
    this.newState = newState;
    this.stateChangeReason = stateChangeReason;
    this.timestamp = timestamp;
  }
}

@@ -981,11 +981,311 @@
 amp;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return String.format(%0A        %22AlarmStateTransitionEvent %5BtenantId=%25s, alarmId=%25s, alarmName=%25s, oldState=%25s, newState=%25s, stateChangeReason=%25s, timestamp=%25s%5D%22,%0A        tenantId, alarmId, alarmName, oldState, newState, stateChangeReason, timestamp);%0A  %7D
 %0A%7D%0A

Alarm event string rep