From e877feed6eedc22792a24188e3fa37099d5f1f93 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Mon, 17 Oct 2022 16:06:08 +0100 Subject: [PATCH] Add @JsonClass to all enums --- .../java/org/matrix/android/sdk/api/rendezvous/model/Outcome.kt | 2 ++ .../org/matrix/android/sdk/api/rendezvous/model/PayloadType.kt | 2 ++ .../org/matrix/android/sdk/api/rendezvous/model/Protocol.kt | 2 ++ .../matrix/android/sdk/api/rendezvous/model/RendezvousIntent.kt | 2 ++ .../android/sdk/api/rendezvous/model/RendezvousTransportType.kt | 2 ++ .../api/rendezvous/model/SecureRendezvousChannelAlgorithm.kt | 2 ++ 6 files changed, 12 insertions(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Outcome.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Outcome.kt index 2ef24e9cb7..a0b2cb31b4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Outcome.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Outcome.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) enum class Outcome(val value: String) { @Json(name = "success") SUCCESS("success"), diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/PayloadType.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/PayloadType.kt index 5ff4cd7cfa..9e0dbd9562 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/PayloadType.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/PayloadType.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) internal enum class PayloadType(val value: String) { @Json(name = "m.login.start") START("m.login.start"), diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Protocol.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Protocol.kt index 18381984a5..3442d4abf4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Protocol.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/Protocol.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) enum class Protocol(val value: String) { @Json(name = "login_token") LOGIN_TOKEN("login_token") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousIntent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousIntent.kt index 1c070599b0..8ce6430212 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousIntent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousIntent.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) enum class RendezvousIntent { @Json(name = "login.start") LOGIN_ON_NEW_DEVICE, @Json(name = "login.reciprocate") RECIPROCATE_LOGIN_ON_EXISTING_DEVICE diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousTransportType.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousTransportType.kt index 9c3e44f25b..2814cad77c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousTransportType.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/RendezvousTransportType.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) enum class RendezvousTransportType(val value: String) { @Json(name = "http.v1") MSC3886_SIMPLE_HTTP_V1("http.v1") } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/SecureRendezvousChannelAlgorithm.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/SecureRendezvousChannelAlgorithm.kt index 9a9db58a41..d9f73a0b99 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/SecureRendezvousChannelAlgorithm.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/rendezvous/model/SecureRendezvousChannelAlgorithm.kt @@ -17,7 +17,9 @@ package org.matrix.android.sdk.api.rendezvous.model import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +@JsonClass(generateAdapter = true) enum class SecureRendezvousChannelAlgorithm(val value: String) { @Json(name = "m.rendezvous.v1.curve25519-aes-sha256") ECDH_V1("m.rendezvous.v1.curve25519-aes-sha256") }