every = $every; $this->period = $period; $this->offset = $offset; $this->fn = $fn; $this->location = $location; $this->column = $column; $this->timeSrc = $timeSrc; $this->timeDst = $timeDst; $this->createEmpty = $createEmpty; } public function __toString() { $input = new ArrayType(array_filter([ 'every' => new DurationType($this->every), 'period' => $this->period ? new DurationType($this->period) : null, 'offset' => $this->offset ? new DurationType($this->offset) : null, 'fn' => new FnType($this->fn), 'location' => $this->location ? new Type($this->location) : null, 'column' => $this->column ? new Type($this->column) : null, 'timeSrc' => $this->timeSrc ? new Type($this->timeSrc) : null, 'timeDst' => $this->timeDst ? new Type($this->timeDst) : null, 'createEmpty' => !$this->createEmpty ? new Type($this->createEmpty) : null, ])); return '|> aggregateWindow(' . $input . ') '; } }