public function getOptions()
    {
        $options = [
            'name'     => $this->name,
            'sparse'   => is_bool($this->sparse) ? $this->sparse : false,
            'dropDups' => $this->dropDuplicates,
            'unique'   => $this->unique
        ];

        if (is_array($this->sparse)) {
            $options['partialFilterExpression'] = $this->sparse;
        }

        return $options;
    }