diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordBegin.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordBegin.java index 44386f267b35f..a1cadc4dddecf 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordBegin.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordBegin.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message informs the bus clients that Mycroft * is actively listening and trying to do STT. @@ -29,7 +31,8 @@ public MessageRecognizerLoopRecordBegin() { } public static class Context { - public String client_name = ""; + @SerializedName("client_name") + public String clientName = ""; public String source = ""; public String destination = ""; } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordEnd.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordEnd.java index c6998b8dae429..3da0b2aefa462 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordEnd.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopRecordEnd.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message informs the bus clients that Mycroft * finished listening to the mic. @@ -29,7 +31,8 @@ public MessageRecognizerLoopRecordEnd() { } public static class Context { - public String client_name = ""; + @SerializedName("client_name") + public String clientName = ""; public String source = ""; public String destination = ""; } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopUtterance.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopUtterance.java index b6d6ab4939db7..243e7c59f0f39 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopUtterance.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageRecognizerLoopUtterance.java @@ -17,6 +17,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message is sent to the skills * module to trigger an intent from a text. @@ -36,7 +38,7 @@ public MessageRecognizerLoopUtterance() { public MessageRecognizerLoopUtterance(String utterance) { this(); this.data.utterances.add(utterance); - this.context.client_name = "java_api"; + this.context.clientName = "java_api"; this.context.source = "audio"; this.context.destination.add("skills"); } @@ -46,7 +48,8 @@ public static class Data { } public static class Context { - public String client_name = ""; + @SerializedName("client_name") + public String clientName = ""; public String source = ""; public List destination = new ArrayList<>(); } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageSpeak.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageSpeak.java index b2ceb9bcfe9e0..c6335ccf578cc 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageSpeak.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageSpeak.java @@ -17,6 +17,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message is sent to the Mycroft audio module * to trigger a TTS action. @@ -41,11 +43,13 @@ public MessageSpeak(String textToSay) { public static class Data { public String utterance = ""; - public String expect_response = ""; + @SerializedName("expect_response") + public String expectResponse = ""; }; public static class Context { - public String client_name = ""; + @SerializedName("client_name") + public String clientName = ""; public List source = new ArrayList<>(); public String destination = ""; } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeDecrease.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeDecrease.java index 2f1e2c8946752..e46fedb1b01d1 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeDecrease.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeDecrease.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message asks Mycroft to decrease the volume by 10% * @@ -28,6 +30,7 @@ public MessageVolumeDecrease() { } public static class Data { - public Boolean play_sound = true; + @SerializedName("play_sound") + public Boolean playSound = true; } } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeIncrease.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeIncrease.java index bd95c180caa7a..5b38d7852aa46 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeIncrease.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeIncrease.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message asks Mycroft to increase the volume by 10% * @@ -28,6 +30,7 @@ public MessageVolumeIncrease() { } public static class Data { - public Boolean play_sound = true; + @SerializedName("play_sound") + public Boolean playSound = true; } } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeMute.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeMute.java index 4c2ab434af01c..7013f85346943 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeMute.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeMute.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message asks Mycroft to mute the volume * @@ -28,6 +30,7 @@ public MessageVolumeMute() { } public static class Data { - public Boolean speak_message = false; + @SerializedName("speak_messsage") + public Boolean speakMesssage = false; } } diff --git a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeUnmute.java b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeUnmute.java index 91602e87256d2..7334cc6c9a7b4 100644 --- a/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeUnmute.java +++ b/bundles/org.openhab.binding.mycroft/src/main/java/org/openhab/binding/mycroft/internal/api/dto/MessageVolumeUnmute.java @@ -14,6 +14,8 @@ import org.openhab.binding.mycroft.internal.api.MessageType; +import com.google.gson.annotations.SerializedName; + /** * This message asks Mycroft to unmute the volume * @@ -28,6 +30,7 @@ public MessageVolumeUnmute() { } public static class Data { - public Boolean speak_message = false; + @SerializedName("speak_messsage") + public Boolean speakMessage = false; } }