/** * The type of alarm histories to retrieve. * * @param historyItemType type of alarm histories to retrieve * * @return this {@code ListAlarmHistoryOptions} object */ public ListAlarmHistoryOptions historyItemType(HistoryItemType historyItemType) { checkNotNull(historyItemType, "historyItemType"); checkArgument(historyItemType != HistoryItemType.UNRECOGNIZED, "historyItemType unrecognized"); formParameters.put("HistoryItemType", historyItemType.toString()); return this; }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
@Override public String toString() { return value(); }
public static HistoryItemType fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
@Override public void endElement(String uri, String name, String qName) throws SAXException { if (qName.equals("AlarmName")) { alarmName = SaxUtils.currentOrNull(currentText); } else if (qName.equals("HistoryData")) { String rawJson = SaxUtils.currentOrNull(currentText); if (rawJson != null) { historyData = rawJson.trim(); } } else if (qName.equals("HistoryItemType")) { historyItemType = HistoryItemType.fromValue(SaxUtils.currentOrNull(currentText)); } else if (qName.equals("HistorySummary")) { historySummary = SaxUtils.currentOrNull(currentText); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601DateParse(currentText.toString().trim()); } currentText = new StringBuilder(); }
public static HistoryItemType fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
@Override public void endElement(String uri, String name, String qName) throws SAXException { if (qName.equals("AlarmName")) { alarmName = SaxUtils.currentOrNull(currentText); } else if (qName.equals("HistoryData")) { String rawJson = SaxUtils.currentOrNull(currentText); if (rawJson != null) { historyData = rawJson.trim(); } } else if (qName.equals("HistoryItemType")) { historyItemType = HistoryItemType.fromValue(SaxUtils.currentOrNull(currentText)); } else if (qName.equals("HistorySummary")) { historySummary = SaxUtils.currentOrNull(currentText); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601DateParse(currentText.toString().trim()); } currentText = new StringBuilder(); }
/** * The type of alarm histories to retrieve. * * @param historyItemType type of alarm histories to retrieve * * @return this {@code ListAlarmHistoryOptions} object */ public ListAlarmHistoryOptions historyItemType(HistoryItemType historyItemType) { checkNotNull(historyItemType, "historyItemType"); checkArgument(historyItemType != HistoryItemType.UNRECOGNIZED, "historyItemType unrecognized"); formParameters.put("HistoryItemType", historyItemType.toString()); return this; }
public static HistoryItemType fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
@Override public String toString() { return value(); }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
@Override public void endElement(String uri, String name, String qName) throws SAXException { if (qName.equals("AlarmName")) { alarmName = SaxUtils.currentOrNull(currentText); } else if (qName.equals("HistoryData")) { String rawJson = SaxUtils.currentOrNull(currentText); if (rawJson != null) { historyData = rawJson.trim(); } } else if (qName.equals("HistoryItemType")) { historyItemType = HistoryItemType.fromValue(SaxUtils.currentOrNull(currentText)); } else if (qName.equals("HistorySummary")) { historySummary = SaxUtils.currentOrNull(currentText); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601DateParse(currentText.toString().trim()); } currentText.setLength(0); }
/** * The type of alarm histories to retrieve. * * @param historyItemType type of alarm histories to retrieve * * @return this {@code ListAlarmHistoryOptions} object */ public ListAlarmHistoryOptions historyItemType(HistoryItemType historyItemType) { checkNotNull(historyItemType, "historyItemType"); checkArgument(historyItemType != HistoryItemType.UNRECOGNIZED, "historyItemType unrecognized"); formParameters.put("HistoryItemType", historyItemType.toString()); return this; }
public static HistoryItemType fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
@Override public String toString() { return value(); }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
@Override public void endElement(String uri, String name, String qName) throws SAXException { if (qName.equals("AlarmName")) { alarmName = SaxUtils.currentOrNull(currentText); } else if (qName.equals("HistoryData")) { String rawJson = SaxUtils.currentOrNull(currentText); if (rawJson != null) { historyData = rawJson.trim(); } } else if (qName.equals("HistoryItemType")) { historyItemType = HistoryItemType.fromValue(SaxUtils.currentOrNull(currentText)); } else if (qName.equals("HistorySummary")) { historySummary = SaxUtils.currentOrNull(currentText); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601DateParse(currentText.toString().trim()); } currentText.setLength(0); }
/** * The type of alarm histories to retrieve. * * @param historyItemType type of alarm histories to retrieve * * @return this {@code ListAlarmHistoryOptions} object */ public ListAlarmHistoryOptions historyItemType(HistoryItemType historyItemType) { checkNotNull(historyItemType, "historyItemType"); checkArgument(historyItemType != HistoryItemType.UNRECOGNIZED, "historyItemType unrecognized"); formParameters.put("HistoryItemType", historyItemType.toString()); return this; }
public static HistoryItemType fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
@Override public String toString() { return value(); }