]> git.basschouten.com Git - openhab-addons.git/blob
ef18d1cb98a6eb39237886da6a0587177b956cc2
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.voice.actiontemplatehli.internal.configuration;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 import com.fasterxml.jackson.annotation.JsonProperty;
21
22 /**
23  * The {@link ActionTemplatePlaceholder} class configures placeholders for the action template
24  *
25  * @author Miguel Álvarez - Initial contribution
26  */
27 @NonNullByDefault
28 public class ActionTemplatePlaceholder {
29     @JsonProperty(value = "label", required = true)
30     public String label = "";
31     @JsonProperty("ner")
32     public @Nullable String nerFile = null;
33     @JsonProperty("nerValues")
34     public String @Nullable [] nerStaticValues = null;
35     @JsonProperty("pos")
36     public @Nullable String posFile = null;
37     @JsonProperty("posValues")
38     public @Nullable Map<String, String> posStaticValues = null;
39
40     public static ActionTemplatePlaceholder withLabel(String label) {
41         var placeholder = new ActionTemplatePlaceholder();
42         placeholder.label = label;
43         return placeholder;
44     }
45 }