/** * @param unit * the unit of the metric */ public GetMetricStatisticsOptions unit(Unit unit) { this.formParameters.put("Unit", unit.toString()); return this; }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()).replace("PerSecond", "/Second"); }
@Override public String toString() { return value(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Average")) { average = doubleOrNull(); } else if (qName.equals("Maximum")) { maximum = doubleOrNull(); } else if (qName.equals("Minimum")) { minimum = doubleOrNull(); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601SecondsDateParse(currentText.toString().trim()); } else if (qName.equals("SampleCount")) { samples = doubleOrNull(); } else if (qName.equals("Sum")) { sum = doubleOrNull(); } else if (qName.equals("Unit")) { unit = Unit.fromValue(currentText.toString().trim()); } else if (qName.equals("CustomUnit")) { customUnit = currentText.toString().trim(); } currentText = new StringBuilder(); }
public static Unit fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace( "/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }
public void endElement(String uri, String name, String qName) { if (qName.equals("Average")) { average = doubleOrNull(); } else if (qName.equals("Maximum")) { maximum = doubleOrNull(); } else if (qName.equals("Minimum")) { minimum = doubleOrNull(); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601SecondsDateParse(currentText.toString().trim()); } else if (qName.equals("SampleCount")) { samples = doubleOrNull(); } else if (qName.equals("Sum")) { sum = doubleOrNull(); } else if (qName.equals("Unit")) { unit = Unit.fromValue(currentText.toString().trim()); } else if (qName.equals("CustomUnit")) { customUnit = currentText.toString().trim(); } currentText.setLength(0); }
public static Unit fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace( "/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }
/** * @param unit * the unit of the metric */ public GetMetricStatisticsOptions unit(Unit unit) { this.formParameters.put("Unit", unit.toString()); return this; }
public void endElement(String uri, String name, String qName) { if (qName.equals("Average")) { average = doubleOrNull(); } else if (qName.equals("Maximum")) { maximum = doubleOrNull(); } else if (qName.equals("Minimum")) { minimum = doubleOrNull(); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601SecondsDateParse(currentText.toString().trim()); } else if (qName.equals("SampleCount")) { samples = doubleOrNull(); } else if (qName.equals("Sum")) { sum = doubleOrNull(); } else if (qName.equals("Unit")) { unit = Unit.fromValue(currentText.toString().trim()); } else if (qName.equals("CustomUnit")) { customUnit = currentText.toString().trim(); } currentText.setLength(0); }
public static Unit fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace( "/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }
@Override public String toString() { return value(); }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()).replace("PerSecond", "/Second"); }
/** * @param unit * the unit of the metric */ public GetMetricStatisticsOptions unit(Unit unit) { this.formParameters.put("Unit", unit.toString()); return this; }
public void endElement(String uri, String name, String qName) { if (qName.equals("Average")) { average = doubleOrNull(); } else if (qName.equals("Maximum")) { maximum = doubleOrNull(); } else if (qName.equals("Minimum")) { minimum = doubleOrNull(); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601SecondsDateParse(currentText.toString().trim()); } else if (qName.equals("SampleCount")) { samples = doubleOrNull(); } else if (qName.equals("Sum")) { sum = doubleOrNull(); } else if (qName.equals("Unit")) { unit = Unit.fromValue(currentText.toString().trim()); } else if (qName.equals("CustomUnit")) { customUnit = currentText.toString().trim(); } currentText = new StringBuilder(); }
public static Unit fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace( "/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }
@Override public String toString() { return value(); }
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()).replace("PerSecond", "/Second"); }
/** * @param unit * the unit of the metric */ public GetMetricStatisticsOptions unit(Unit unit) { this.formParameters.put("Unit", unit.toString()); return this; }
public void endElement(String uri, String name, String qName) { if (qName.equals("Average")) { average = doubleOrNull(); } else if (qName.equals("Maximum")) { maximum = doubleOrNull(); } else if (qName.equals("Minimum")) { minimum = doubleOrNull(); } else if (qName.equals("Timestamp")) { timestamp = dateService.iso8601SecondsDateParse(currentText.toString().trim()); } else if (qName.equals("SampleCount")) { samples = doubleOrNull(); } else if (qName.equals("Sum")) { sum = doubleOrNull(); } else if (qName.equals("Unit")) { unit = Unit.fromValue(currentText.toString().trim()); } else if (qName.equals("CustomUnit")) { customUnit = currentText.toString().trim(); } currentText = new StringBuilder(); }
public static Unit fromValue(String value) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace( "/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }