]> git.basschouten.com Git - openhab-addons.git/blob
3ce765eae26650300944bd35b3b417f55b056cc5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.avmfritz.internal.dto;
14
15 import java.math.BigDecimal;
16
17 import javax.xml.bind.annotation.XmlAccessType;
18 import javax.xml.bind.annotation.XmlAccessorType;
19 import javax.xml.bind.annotation.XmlRootElement;
20 import javax.xml.bind.annotation.XmlType;
21
22 /**
23  * See {@link DeviceListModel}.
24  *
25  * @author Christoph Weitkamp - Initial contribution
26  */
27 @XmlAccessorType(XmlAccessType.FIELD)
28 @XmlType(propOrder = { "state" })
29 @XmlRootElement(name = "alert")
30 public class AlertModel {
31     public static final BigDecimal ON = BigDecimal.ONE;
32     public static final BigDecimal OFF = BigDecimal.ZERO;
33
34     private BigDecimal state;
35
36     public BigDecimal getState() {
37         return state;
38     }
39
40     public void setState(BigDecimal state) {
41         this.state = state;
42     }
43
44     @Override
45     public String toString() {
46         return new StringBuilder().append("[state=").append(state).append("]").toString();
47     }
48 }