Record Class TimeSeriesStatsResponse
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.stats.dto.TimeSeriesStatsResponse
public record TimeSeriesStatsResponse(String field, TimeSeriesGranularity granularity, StatsMetricRequest metric, List<TimeSeriesPoint> points, List<StatsMetricRequest> metrics)
extends Record
Contrato canonico de resposta para series temporais agregadas.
A resposta devolve o campo temporal de referencia, a granularidade aplicada e a serie de pontos
resultante. Em cenarios multi-metrica, a lista metrics expõe as metricas efetivamente
processadas, mantendo compatibilidade com o campo principal metric.
-
Constructor Summary
ConstructorsConstructorDescriptionTimeSeriesStatsResponse(String field, TimeSeriesGranularity granularity, StatsMetricRequest metric, List<TimeSeriesPoint> points) Construtor de compatibilidade para respostas de metrica unica.TimeSeriesStatsResponse(String field, TimeSeriesGranularity granularity, StatsMetricRequest metric, List<TimeSeriesPoint> points, List<StatsMetricRequest> metrics) Creates an instance of aTimeSeriesStatsResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionRetorna a lista efetiva de metricas presentes na resposta.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.Returns the value of thegranularityrecord component.final inthashCode()Returns a hash code value for this object.metric()Returns the value of themetricrecord component.metrics()Returns the value of themetricsrecord component.points()Returns the value of thepointsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TimeSeriesStatsResponse
public TimeSeriesStatsResponse(String field, TimeSeriesGranularity granularity, StatsMetricRequest metric, List<TimeSeriesPoint> points) Construtor de compatibilidade para respostas de metrica unica. -
TimeSeriesStatsResponse
public TimeSeriesStatsResponse(String field, TimeSeriesGranularity granularity, StatsMetricRequest metric, List<TimeSeriesPoint> points, List<StatsMetricRequest> metrics) Creates an instance of aTimeSeriesStatsResponserecord class.- Parameters:
field- the value for thefieldrecord componentgranularity- the value for thegranularityrecord componentmetric- the value for themetricrecord componentpoints- the value for thepointsrecord componentmetrics- the value for themetricsrecord component
-
-
Method Details
-
effectiveMetrics
Retorna a lista efetiva de metricas presentes na resposta.- Returns:
- lista efetiva de metricas, com fallback para
metric
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
granularity
Returns the value of thegranularityrecord component.- Returns:
- the value of the
granularityrecord component
-
metric
Returns the value of themetricrecord component.- Returns:
- the value of the
metricrecord component
-
points
Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-