public function options($options = null)
    {
        if (is_array($options)) {
            if ($this->options && $this->options instanceof Options) {
                $options = array_merge($this->options->toArray(), $options);
            }
            if (! Arr::has($options, 'priority')) {
                $options['priority'] = OptionsPriorities::normal;
            }
            $builder = new OptionsBuilder();
            $options = static::populateBuilder($builder, static::OPTIONS_MAP, $options);
        }
        if ($options instanceof Options) {
            $this->options = $options;
        } elseif ($options instanceof OptionsBuilder) {
            $this->options = $options->build();
        } elseif (! is_null($options)) {
            throw static::makeInvalidArgumentException(
                $options,
                'options',
                Options::class,
                OptionsBuilder::class
            );
        }

        return $this;
    }