public function toArray()
{
if (!$this->hasParam('buckets_path')) {
throw new InvalidException('Buckets path is required');
} elseif (!$this->hasParam('script')) {
throw new InvalidException('Script parameter is required');
}
return parent::toArray();
}