| 1 | package Druid::Aggregation; | ||
| 2 | |||
| 3 | use Moo; | ||
| 4 | |||
| 5 | has type => (is => 'ro'); | ||
| 6 | has name => (is => 'ro'); | ||
| 7 | has fieldName => (is => 'ro'); | ||
| 8 | |||
| 9 | sub build { | ||
| 10 | my $self = shift; | ||
| 11 | |||
| 12 | my $aggregation = { | ||
| 13 | 'type' => $self->type, | ||
| 14 | 'name' => $self->name, | ||
| 15 | 'fieldName' => $self->fieldName, | ||
| 16 | }; | ||
| 17 | |||
| 18 | return $aggregation; | ||
| 19 | } | ||
| 20 | |||
| 21 | 1; |