protected function parseUnionStruct($typeDef)
    {
        $typeDefCount = count($typeDef);
        if ($typeDefCount === 3) {
            $unionName = $typeDef[1];
            $unionTypes = array_filter(explode(',', $typeDef[2]), function ($type) {
                return !empty($type);
            });
            sort($unionTypes);
            $this->getGenerator()->getStructs()->addUnionStruct($unionName, $unionTypes);
        }
    }