]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/JsonStickerPack.java
Refactor ReceiveCommand in dbus mode and remove ExtendedDbusCommand
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / JsonStickerPack.java
index 74ee6d0231b32865a6cde3c7f3d4570d0b6ff5d6..891144264f8d3ec9b17a04f3d2052eadc8843ce7 100644 (file)
@@ -1,55 +1,8 @@
 package org.asamk.signal.manager;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-
 import java.util.List;
 
-public class JsonStickerPack {
-
-    @JsonProperty
-    public String title;
-
-    @JsonProperty
-    public String author;
-
-    @JsonProperty
-    public JsonSticker cover;
-
-    @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
-        public String emoji;
-
-        @JsonProperty
-        public String file;
-
-        @JsonProperty
-        public String contentType;
-
-        // For deserialization
-        private JsonSticker() {
-        }
+public record JsonStickerPack(String title, String author, JsonSticker cover, List<JsonSticker> stickers) {
 
-        public JsonSticker(final String emoji, final String file, final String contentType) {
-            this.emoji = emoji;
-            this.file = file;
-            this.contentType = contentType;
-        }
-    }
+    public record JsonSticker(String emoji, String file, String contentType) {}
 }