Created
November 11, 2017 15:53
-
-
Save gregturn/5206465934361f718b9e538f90159b31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@Value | |
@Builder(builderMethodName = "collectionJson") | |
public class CollectionJson<T> { | |
private String version; | |
private String href; | |
private List<Link> links; | |
@Singular private List<Item<T>> items; | |
@JsonCreator | |
public CollectionJson(@JsonProperty("version") String version, @JsonProperty("href") String href, | |
@JsonProperty("links") List<Link> links, @JsonProperty("items") List<Item<T>> items) { | |
this.version = version; | |
this.href = href; | |
this.links = links; | |
this.items = items; | |
} | |
public static Item.ItemBuilder item() { | |
return Item.builder(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment