Last active
May 20, 2018 21:16
-
-
Save appsoluut/b15e7c7bbcc41a0c7a986f82aa986348 to your computer and use it in GitHub Desktop.
Article Blocks POJO examples
This file contains 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
public interface Block { | |
} | |
@AutoValue | |
public abstract class TextBlock implements Block { | |
@SerializedName("text") | |
public abstract String text(); | |
} | |
@AutoValue | |
public abstract class ImageBlock implements Block { | |
@SerializedName("source") | |
public abstract String source(); | |
@Nullable | |
@SerializedName("author") | |
public abstract String author(); | |
@Nullable | |
@SerializedName("description") | |
public abstract String description(); | |
} | |
@AutoValue | |
public abstract class VideoBlock implements Block { | |
@SerializedName("source") | |
public abstract String source(); | |
@SerializedName("thumbnail") | |
public abstract String thumbnail(); | |
@SerializedName("title") | |
public abstract String title(); | |
@SerializedName("duration") | |
public abstract int duration(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment