public function get_discussion_summary_from_stdclass(
        stdClass $discussion,
        stdClass $firstpost,
        stdClass $firstpostauthor,
        stdClass $latestpostauthor
    ) : discussion_summary_entity {

        $firstpostauthorentity = $this->get_author_from_stdclass($firstpostauthor);
        return new discussion_summary_entity(
            $this->get_discussion_from_stdclass($discussion),
            $this->get_post_from_stdclass($firstpost, $firstpostauthorentity),
            $firstpostauthorentity,
            $this->get_author_from_stdclass($latestpostauthor)
        );
    }