TypeResample🔗
Definition🔗
class TypeResample implements \JsonSerializable, \Grafana\Foundation\Cog\Dataquery
{
/**
* The datasource
*/
public ?\Grafana\Foundation\Dashboard\DataSourceRef $datasource;
/**
* The downsample function
* Possible enum values:
* - `"sum"`
* - `"mean"`
* - `"min"`
* - `"max"`
* - `"count"`
* - `"last"`
* - `"median"`
*/
public \Grafana\Foundation\Expr\TypeResampleDownsampler $downsampler;
/**
* The math expression
*/
public string $expression;
/**
* true if query is disabled (ie should not be returned to the dashboard)
* NOTE: this does not always imply that the query should not be executed since
* the results from a hidden query may be used as the input to other queries (SSE etc)
*/
public ?bool $hide;
/**
* Interval is the suggested duration between time points in a time series query.
* NOTE: the values for intervalMs is not saved in the query model. It is typically calculated
* from the interval required to fill a pixels in the visualization
*/
public ?float $intervalMs;
/**
* MaxDataPoints is the maximum number of data points that should be returned from a time series query.
* NOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated
* from the number of pixels visible in a visualization
*/
public ?int $maxDataPoints;
/**
* QueryType is an optional identifier for the type of query.
* It can be used to distinguish different types of queries.
*/
public ?string $queryType;
/**
* RefID is the unique identifier of the query, set by the frontend call.
*/
public string $refId;
/**
* Optionally define expected query result behavior
*/
public ?\Grafana\Foundation\Expr\ExprTypeResampleResultAssertions $resultAssertions;
/**
* TimeRange represents the query range
* NOTE: unlike generic /ds/query, we can now send explicit time values in each query
* NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly
*/
public ?\Grafana\Foundation\Expr\ExprTypeResampleTimeRange $timeRange;
public string $type;
/**
* The upsample function
* Possible enum values:
* - `"pad"` Use the last seen value
* - `"backfilling"` backfill
* - `"fillna"` Do not fill values (nill)
*/
public \Grafana\Foundation\Expr\TypeResampleUpsampler $upsampler;
/**
* The time duration
*/
public string $window;
}
Methods🔗
fromArray🔗
Builds this object from an array.
This function is meant to be used with the return value of json_decode($json, true)
.
jsonSerialize🔗
Returns the data representing this object, preparing it for JSON serialization with json_encode()
.
dataqueryType🔗
Returns the type of this dataquery object.