]> git.basschouten.com Git - openhab-addons.git/blob
1b78d42119997ea39b4249fa12400938b644e4b4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.binding.tacmi.internal.schema;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  * The {@link ChangerX2Entry} class contains mapping information for a changerX2 entry of
22  * the API page element
23  *
24  * @author Christian Niessner - Initial contribution
25  */
26 @NonNullByDefault
27 public class ChangerX2Entry {
28
29     public static final String NUMBER_MIN = "min";
30     public static final String NUMBER_MAX = "max";
31     public static final String NUMBER_STEP = "step";
32
33     enum OptionType {
34         NUMBER,
35         SELECT,
36         TIME,
37     }
38
39     /**
40      * field name of the address
41      */
42     public final String addressFieldName;
43
44     /**
45      * The address these options are for
46      */
47     public final String address;
48
49     /**
50      * option type
51      */
52     public final OptionType optionType;
53
54     /**
55      * field name of the option value
56      */
57     public final String optionFieldName;
58
59     /**
60      * the valid options
61      */
62     public final Map<String, @Nullable String> options;
63
64     public ChangerX2Entry(String addressFieldName, String address, String optionFieldName, OptionType optionType,
65             Map<String, @Nullable String> options) {
66         this.addressFieldName = addressFieldName;
67         this.address = address;
68         this.optionFieldName = optionFieldName;
69         this.optionType = optionType;
70         this.options = options;
71     }
72 }