2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mycroft.internal.api.dto;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.openhab.binding.mycroft.internal.api.MessageType;
21 * This message is sent to the skills
22 * module to trigger an intent from a text.
24 * @author Gwendal Roulleau - Initial contribution
26 public class MessageRecognizerLoopUtterance extends BaseMessage {
28 public Data data = new Data();
30 public Context context = new Context();
32 public MessageRecognizerLoopUtterance() {
33 this.type = MessageType.recognizer_loop__utterance;
36 public MessageRecognizerLoopUtterance(String utterance) {
38 this.data.utterances.add(utterance);
39 this.context.client_name = "java_api";
40 this.context.source = "audio";
41 this.context.destination.add("skills");
44 public static class Data {
45 public List<String> utterances = new ArrayList<>();
48 public static class Context {
49 public String client_name = "";
50 public String source = "";
51 public List<String> destination = new ArrayList<>();