<?php

namespace App\Service\DataGrid;

final class DataGridAggregate
{
    private $id;
    private $function;
    private $field;
    private $value = null;
    private $groupBy;

    public function __construct(String $id, String $function, String $field, string $groupBy)
    {
        $this->id = $id;
        $this->function = $function;
        $this->field = $field;
        $this->groupBy = $groupBy;
    }

    public function getValue()
    {
        return $this->value;
    }

    /**
     * @param null $value
     */
    public function setValue($value): void
    {
        $this->value = $value;
    }

    /**
     * @return string
     */
    public function getId(): String
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getFunction(): String
    {
        return $this->function;
    }

    /**
     * @return string
     */
    public function getField(): String
    {
        return $this->field;
    }

    /**
     * @return string
     */
    public function getGroupBy(): string
    {
        return $this->groupBy;
    }
}
