]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/JsonStickerPack.java
Use Java 17
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / JsonStickerPack.java
index 3ff40585df7ab66f756c56ed9628d0e195156240..74ee6d0231b32865a6cde3c7f3d4570d0b6ff5d6 100644 (file)
@@ -18,6 +18,19 @@ public class JsonStickerPack {
     @JsonProperty
     public List<JsonSticker> stickers;
 
+    // For deserialization
+    private JsonStickerPack() {
+    }
+
+    public JsonStickerPack(
+            final String title, final String author, final JsonSticker cover, final List<JsonSticker> stickers
+    ) {
+        this.title = title;
+        this.author = author;
+        this.cover = cover;
+        this.stickers = stickers;
+    }
+
     public static class JsonSticker {
 
         @JsonProperty
@@ -28,5 +41,15 @@ public class JsonStickerPack {
 
         @JsonProperty
         public String contentType;
+
+        // For deserialization
+        private JsonSticker() {
+        }
+
+        public JsonSticker(final String emoji, final String file, final String contentType) {
+            this.emoji = emoji;
+            this.file = file;
+            this.contentType = contentType;
+        }
     }
 }