package moe.banana.jsonapi2;

public final class ResourceLinkage {

    public final String type;
    public final String id;

    private ResourceLinkage(String type, String id) {
        this.type = type;
        this.id = id;
    }

    public static ResourceLinkage of(String type, String id) {
        return new ResourceLinkage(type, id);
    }
}

@@ -343,11 +343,125 @@
 );%0A    %7D
+%0A%0A    public static ResourceLinkage of(Resource resource) %7B%0A        return of(resource._type, resource._id);%0A    %7D
 %0A%7D%0A

add linkage helper