protected function export_model_data() : \stdClass {

        $versions = \core_component::get_all_versions();

        $data = new \stdClass();

        // Target.
        $data->target = $this->model->get_target()->get_id();
        $requiredclasses[] = $data->target;

        // Time splitting method.
        $data->timesplitting = $this->model->get_time_splitting()->get_id();
        $requiredclasses[] = $data->timesplitting;

        // Model indicators.
        $data->indicators = [];
        foreach ($this->model->get_indicators() as $indicator) {
            $indicatorid = $indicator->get_id();
            $data->indicators[] = $indicatorid;
            $requiredclasses[] = $indicatorid;
        }

        // Return the predictions processor this model is using, even if no predictions processor
        // was explicitly selected.
        $predictionsprocessor = $this->model->get_predictions_processor();
        $data->processor = '\\' . get_class($predictionsprocessor);
        $requiredclasses[] = $data->processor;

        // Add information for versioning.
        $data->dependencies = [];
        foreach ($requiredclasses as $fullclassname) {
            $component = $this->get_class_component($fullclassname);
            $data->dependencies[$component] = $versions[$component];
        }

        return $data;
    }