Skip to content

AdhocVariableSpec🔗

Adhoc variable specification

Definition🔗

class AdhocVariableSpec implements \JsonSerializable
{
    public string $name;

    /**
     * @var array<\Grafana\Foundation\Dashboardv2\AdHocFilterWithLabels>
     */
    public array $baseFilters;

    /**
     * @var array<\Grafana\Foundation\Dashboardv2\AdHocFilterWithLabels>
     */
    public array $filters;

    /**
     * @var array<\Grafana\Foundation\Dashboardv2\MetricFindValue>
     */
    public array $defaultKeys;

    public ?string $label;

    public \Grafana\Foundation\Dashboardv2\VariableHide $hide;

    public bool $skipUrlSync;

    public ?string $description;

    public bool $allowCustomValue;

    /**
     * Whether the group-by operator is enabled in the ad hoc filter combobox.
     */
    public ?bool $enableGroupBy;

    public ?\Grafana\Foundation\Dashboardv2\ControlSourceRef $origin;

}

Methods🔗

fromArray🔗

Builds this object from an array.

This function is meant to be used with the return value of json_decode($json, true).

static fromArray(array $inputData)

jsonSerialize🔗

Returns the data representing this object, preparing it for JSON serialization with json_encode().

jsonSerialize()