@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(namespace()); hashCode = 31 * hashCode + Objects.hashCode(metricData()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(namespace()); hashCode = 31 * hashCode + Objects.hashCode(metricData()); return hashCode; }
/** * 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. */ @Override public String toString() { return ToString.builder("PutMetricDataRequest").add("Namespace", namespace()).add("MetricData", metricData()).build(); }
/** * 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. */ @Override public String toString() { return ToString.builder("PutMetricDataRequest").add("Namespace", namespace()).add("MetricData", metricData()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Namespace": return Optional.ofNullable(clazz.cast(namespace())); case "MetricData": return Optional.ofNullable(clazz.cast(metricData())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Namespace": return Optional.ofNullable(clazz.cast(namespace())); case "MetricData": return Optional.ofNullable(clazz.cast(metricData())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PutMetricDataRequest)) { return false; } PutMetricDataRequest other = (PutMetricDataRequest) obj; return Objects.equals(namespace(), other.namespace()) && Objects.equals(metricData(), other.metricData()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PutMetricDataRequest)) { return false; } PutMetricDataRequest other = (PutMetricDataRequest) obj; return Objects.equals(namespace(), other.namespace()) && Objects.equals(metricData(), other.metricData()); }