protected function defineLinks(NodeBuilder $builder)
    {
        $builder->arrayNode('links')
            ->useAttributeAsKey('')
            ->prototype('array')
            ->children()

            ->scalarNode('resource')
                ->isRequired()
                ->cannotBeEmpty()
            ->end()

            ->arrayNode('parameters')
                ->prototype('scalar')->end()
            ->end()

            ->arrayNode('metadata')
                ->prototype('scalar')->end()
            ->end();
    }