<?xml version="1.0" encoding="UTF-8"?>
<serializer>
    <class name="Hateoas\Tests\Fixtures\User" h:providers="Hateoas\Tests\Fixtures\User::getRelations" xmlns:h="https://github.com/willdurand/Hateoas">
        <h:relation rel="self">
            <h:href uri="http://hateoas.web/user/42"/>
            <h:attribute name="type" value="application/json"/>
        </h:relation>

        <h:relation rel="foo">
            <h:href route="user_get">
                <h:parameter name="id" value="expr(object.getId())"/>
            </h:href>
            <h:embedded>
                <h:content>expr(object.getFoo())</h:content>
            </h:embedded>
        </h:relation>

        <h:relation rel="bar">
            <h:href uri="foo"/>
            <h:embedded xml-element-name="barTag">
                <h:content>data</h:content>
            </h:embedded>
        </h:relation>

        <h:relation rel="baz">
            <h:href route="user_get" absolute="true">
                <h:parameter name="id" value="expr(object.getId())"/>
            </h:href>
        </h:relation>

        <h:relation rel="boom">
            <h:href route="user_get" absolute="false">
                <h:parameter name="id" value="expr(object.getId())"/>
            </h:href>
        </h:relation>

        <h:relation rel="badaboom">
            <h:embedded>
                <h:content>expr(object.getFoo())</h:content>
            </h:embedded>
        </h:relation>

        <h:relation rel="hello">
            <h:href uri="/hello"/>
            <h:embedded type="string">
                <h:content>hello</h:content>
                <h:exclusion groups="group3,group4" since-version="1.1" until-version="2.3" max-depth="43" exclude-if="bar"/>
            </h:embedded>
            <h:exclusion groups="group1, group2" since-version="1" until-version="2.2" max-depth="42" exclude-if="foo"/>
        </h:relation>

        <h:relation rel="attribute_with_expression">
            <h:href uri="baz"/>
            <h:attribute name="baz" value="expr(object.getId())"/>
        </h:relation>
    </class>
</serializer>
