@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getHistoryItemType() == null) ? 0 : getHistoryItemType().hashCode()); hashCode = prime * hashCode + ((getHistorySummary() == null) ? 0 : getHistorySummary().hashCode()); hashCode = prime * hashCode + ((getHistoryData() == null) ? 0 : getHistoryData().hashCode()); return hashCode; }
/** * <p> * The descriptive name for the alarm. * </p> * * @param alarmName * The descriptive name for the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public AlarmHistoryItem withAlarmName(String alarmName) { setAlarmName(alarmName); return this; }
/** * <p> * Data about the alarm, in JSON format. * </p> * * @param historyData * Data about the alarm, in JSON format. * @return Returns a reference to this object so that method calls can be chained together. */ public AlarmHistoryItem withHistoryData(String historyData) { setHistoryData(historyData); return this; }
public AlarmHistoryItem unmarshall(StaxUnmarshallerContext context) throws Exception { AlarmHistoryItem alarmHistoryItem = new AlarmHistoryItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; alarmHistoryItem.setAlarmName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; alarmHistoryItem.setTimestamp(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; alarmHistoryItem.setHistoryItemType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; alarmHistoryItem.setHistorySummary(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; alarmHistoryItem.setHistoryData(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * A summary of the alarm history, in text format. * </p> * * @param historySummary * A summary of the alarm history, in text format. * @return Returns a reference to this object so that method calls can be chained together. */ public AlarmHistoryItem withHistorySummary(String historySummary) { setHistorySummary(historySummary); return this; }
/** * <p> * The type of alarm history item. * </p> * * @param historyItemType * The type of alarm history item. * @return Returns a reference to this object so that method calls can be chained together. * @see HistoryItemType */ public AlarmHistoryItem withHistoryItemType(String historyItemType) { setHistoryItemType(historyItemType); return this; }
public AlarmHistoryItem unmarshall(StaxUnmarshallerContext context) throws Exception { AlarmHistoryItem alarmHistoryItem = new AlarmHistoryItem(); alarmHistoryItem.setAlarmName(StringStaxUnmarshaller.getInstance().unmarshall( context)); continue; alarmHistoryItem.setTimestamp(DateStaxUnmarshaller.getInstance().unmarshall( context)); continue; alarmHistoryItem.setHistoryItemType(StringStaxUnmarshaller.getInstance() .unmarshall(context)); continue; alarmHistoryItem.setHistorySummary(StringStaxUnmarshaller.getInstance() .unmarshall(context)); continue; alarmHistoryItem.setHistoryData(StringStaxUnmarshaller.getInstance() .unmarshall(context)); continue;
return false; AlarmHistoryItem other = (AlarmHistoryItem) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getHistoryItemType() == null ^ this.getHistoryItemType() == null) return false; if (other.getHistoryItemType() != null && other.getHistoryItemType().equals(this.getHistoryItemType()) == false) return false; if (other.getHistorySummary() == null ^ this.getHistorySummary() == null) return false; if (other.getHistorySummary() != null && other.getHistorySummary().equals(this.getHistorySummary()) == false) return false; if (other.getHistoryData() == null ^ this.getHistoryData() == null) return false; if (other.getHistoryData() != null && other.getHistoryData().equals(this.getHistoryData()) == false) return false; return true;
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAlarmName() != null) sb.append("AlarmName: ").append(getAlarmName()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(","); if (getHistoryItemType() != null) sb.append("HistoryItemType: ").append(getHistoryItemType()).append(","); if (getHistorySummary() != null) sb.append("HistorySummary: ").append(getHistorySummary()).append(","); if (getHistoryData() != null) sb.append("HistoryData: ").append(getHistoryData()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getHistoryItemType() == null) ? 0 : getHistoryItemType().hashCode()); hashCode = prime * hashCode + ((getHistorySummary() == null) ? 0 : getHistorySummary().hashCode()); hashCode = prime * hashCode + ((getHistoryData() == null) ? 0 : getHistoryData().hashCode()); return hashCode; }
AlarmHistoryItem other = (AlarmHistoryItem) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getHistoryItemType() == null ^ this.getHistoryItemType() == null) return false; if (other.getHistoryItemType() != null && other.getHistoryItemType().equals(this.getHistoryItemType()) == false) return false; if (other.getHistorySummary() == null ^ this.getHistorySummary() == null) return false; if (other.getHistorySummary() != null && other.getHistorySummary().equals(this.getHistorySummary()) == false) return false; if (other.getHistoryData() == null ^ this.getHistoryData() == null) return false; if (other.getHistoryData() != null && other.getHistoryData().equals(this.getHistoryData()) == false) return false; return true;
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAlarmName() != null) sb.append("AlarmName: " + getAlarmName() + ","); if (getTimestamp() != null) sb.append("Timestamp: " + getTimestamp() + ","); if (getHistoryItemType() != null) sb.append("HistoryItemType: " + getHistoryItemType() + ","); if (getHistorySummary() != null) sb.append("HistorySummary: " + getHistorySummary() + ","); if (getHistoryData() != null) sb.append("HistoryData: " + getHistoryData()); sb.append("}"); return sb.toString(); }
public void marshall(AlarmHistoryItem _alarmHistoryItem, Request<?> request, String _prefix) { String prefix; if (_alarmHistoryItem.getAlarmName() != null) { prefix = _prefix + "AlarmName"; String alarmName = _alarmHistoryItem.getAlarmName(); request.addParameter(prefix, StringUtils.fromString(alarmName)); } if (_alarmHistoryItem.getTimestamp() != null) { prefix = _prefix + "Timestamp"; java.util.Date timestamp = _alarmHistoryItem.getTimestamp(); request.addParameter(prefix, StringUtils.fromDate(timestamp)); } if (_alarmHistoryItem.getHistoryItemType() != null) { prefix = _prefix + "HistoryItemType"; String historyItemType = _alarmHistoryItem.getHistoryItemType(); request.addParameter(prefix, StringUtils.fromString(historyItemType)); } if (_alarmHistoryItem.getHistorySummary() != null) { prefix = _prefix + "HistorySummary"; String historySummary = _alarmHistoryItem.getHistorySummary(); request.addParameter(prefix, StringUtils.fromString(historySummary)); } if (_alarmHistoryItem.getHistoryData() != null) { prefix = _prefix + "HistoryData"; String historyData = _alarmHistoryItem.getHistoryData(); request.addParameter(prefix, StringUtils.fromString(historyData)); } }