Skip to content

AnnotationQuerySpec🔗

Definition🔗

class AnnotationQuerySpec implements \JsonSerializable
{
    public \Grafana\Foundation\Dashboardv2beta1\DataQueryKind $query;

    public bool $enable;

    public bool $hide;

    public string $iconColor;

    public string $name;

    public ?bool $builtIn;

    public ?\Grafana\Foundation\Dashboardv2beta1\AnnotationPanelFilter $filter;

    /**
     * Placement can be used to display the annotation query somewhere else on the dashboard other than the default location.
     */
    public ?string $placement;

    /**
     * Mappings define how to convert data frame fields to annotation event fields.
     * @var array<string, \Grafana\Foundation\Dashboardv2beta1\AnnotationEventFieldMapping>|null
     */
    public ?array $mappings;

    /**
     * Catch-all field for datasource-specific properties. Should not be available in as code tooling.
     * @var array<string, mixed>|null
     */
    public ?array $legacyOptions;

}

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()

See also🔗