diff options
Diffstat (limited to 'src/main/java/moe/ymc/acron/s2c/response')
5 files changed, 49 insertions, 0 deletions
diff --git a/src/main/java/moe/ymc/acron/s2c/response/EventCmdDenied.java b/src/main/java/moe/ymc/acron/s2c/response/EventCmdDenied.java new file mode 100644 index 0000000..85fcf8d --- /dev/null +++ b/src/main/java/moe/ymc/acron/s2c/response/EventCmdDenied.java @@ -0,0 +1,8 @@ +package moe.ymc.acron.s2c.response; + +import com.google.gson.annotations.SerializedName; +import moe.ymc.acron.s2c.Event; + +public record EventCmdDenied(@SerializedName("id") int id) + implements Event { +} diff --git a/src/main/java/moe/ymc/acron/s2c/response/EventCmdOut.java b/src/main/java/moe/ymc/acron/s2c/response/EventCmdOut.java new file mode 100644 index 0000000..e5bd609 --- /dev/null +++ b/src/main/java/moe/ymc/acron/s2c/response/EventCmdOut.java @@ -0,0 +1,13 @@ +package moe.ymc.acron.s2c.response; + +import com.google.gson.annotations.SerializedName; +import moe.ymc.acron.s2c.Event; +import org.jetbrains.annotations.NotNull; + +import java.util.UUID; + +public record EventCmdOut(@SerializedName("id") int id, + @SerializedName("sender") @NotNull UUID sender, + @SerializedName("text") @NotNull String text) + implements Event { +} diff --git a/src/main/java/moe/ymc/acron/s2c/response/EventCmdRes.java b/src/main/java/moe/ymc/acron/s2c/response/EventCmdRes.java new file mode 100644 index 0000000..8c1b6a9 --- /dev/null +++ b/src/main/java/moe/ymc/acron/s2c/response/EventCmdRes.java @@ -0,0 +1,10 @@ +package moe.ymc.acron.s2c.response; + +import com.google.gson.annotations.SerializedName; +import moe.ymc.acron.s2c.Event; + +public record EventCmdRes(@SerializedName("id") int id, + @SerializedName("success") boolean success, + @SerializedName("result") int result) + implements Event { +} diff --git a/src/main/java/moe/ymc/acron/s2c/response/EventError.java b/src/main/java/moe/ymc/acron/s2c/response/EventError.java new file mode 100644 index 0000000..48d2683 --- /dev/null +++ b/src/main/java/moe/ymc/acron/s2c/response/EventError.java @@ -0,0 +1,10 @@ +package moe.ymc.acron.s2c.response; + +import com.google.gson.annotations.SerializedName; +import moe.ymc.acron.s2c.Event; +import org.jetbrains.annotations.Nullable; + +public record EventError(@SerializedName("id") int id, + @SerializedName("message") @Nullable String message) + implements Event { +} diff --git a/src/main/java/moe/ymc/acron/s2c/response/EventOk.java b/src/main/java/moe/ymc/acron/s2c/response/EventOk.java new file mode 100644 index 0000000..eb8c82d --- /dev/null +++ b/src/main/java/moe/ymc/acron/s2c/response/EventOk.java @@ -0,0 +1,8 @@ +package moe.ymc.acron.s2c.response; + +import com.google.gson.annotations.SerializedName; +import moe.ymc.acron.s2c.Event; + +public record EventOk(@SerializedName("id") int id) + implements Event { +} |