]> git.basschouten.com Git - openhab-addons.git/blob
a4f9e7494767bc723d5a0696aea8c5e4fcfe23ef
[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     }
37
38     /**
39      * field name of the address
40      */
41     public final String addressFieldName;
42
43     /**
44      * The address these options are for
45      */
46     public final String address;
47
48     /**
49      * option type
50      */
51     public final OptionType optionType;
52
53     /**
54      * field name of the option value
55      */
56     public final String optionFieldName;
57
58     /**
59      * the valid options
60      */
61     public final Map<String, @Nullable String> options;
62
63     public ChangerX2Entry(String addressFieldName, String address, String optionFieldName, OptionType optionType,
64             Map<String, @Nullable String> options) {
65         this.addressFieldName = addressFieldName;
66         this.address = address;
67         this.optionFieldName = optionFieldName;
68         this.optionType = optionType;
69         this.options = options;
70     }
71 }