001package com.box.sdkgen.schemas.v2026r0.queryinsightmetricresultv2026r0;
002
003import com.box.sdkgen.internal.SerializableObject;
004import com.fasterxml.jackson.annotation.JsonFilter;
005import com.fasterxml.jackson.annotation.JsonProperty;
006import java.util.Map;
007import java.util.Objects;
008
009/** The computed result for a single metric, including the metric type and its computed value(s). */
010@JsonFilter("nullablePropertyFilter")
011public class QueryInsightMetricResultV2026R0 extends SerializableObject {
012
013  /** The metric type that was computed. */
014  protected final String type;
015
016  /**
017   * The computed metric result(s), keyed by the metric function (for example `sum`, `avg`, `min`,
018   * `max`, or `count`).
019   */
020  protected final Map<String, Double> values;
021
022  public QueryInsightMetricResultV2026R0(
023      @JsonProperty("type") String type, @JsonProperty("values") Map<String, Double> values) {
024    super();
025    this.type = type;
026    this.values = values;
027  }
028
029  public String getType() {
030    return type;
031  }
032
033  public Map<String, Double> getValues() {
034    return values;
035  }
036
037  @Override
038  public boolean equals(Object o) {
039    if (this == o) {
040      return true;
041    }
042    if (o == null || getClass() != o.getClass()) {
043      return false;
044    }
045    QueryInsightMetricResultV2026R0 casted = (QueryInsightMetricResultV2026R0) o;
046    return Objects.equals(type, casted.type) && Objects.equals(values, casted.values);
047  }
048
049  @Override
050  public int hashCode() {
051    return Objects.hash(type, values);
052  }
053
054  @Override
055  public String toString() {
056    return "QueryInsightMetricResultV2026R0{"
057        + "type='"
058        + type
059        + '\''
060        + ", "
061        + "values='"
062        + values
063        + '\''
064        + "}";
065  }
066}