]> git.basschouten.com Git - openhab-addons.git/blob
eb0aa1c903c3db6fb2f3b5d8a94f4dff345ceff9
[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.binding.lcn.internal.pchkdiscovery;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
18 import com.thoughtworks.xstream.annotations.XStreamConverter;
19 import com.thoughtworks.xstream.converters.extended.ToAttributedValueConverter;
20
21 /**
22  * Used for deserializing the XML response of the LCN-PCHK discovery protocol.
23  *
24  * @author Fabian Wolter - Initial contribution
25  */
26 @NonNullByDefault
27 @XStreamConverter(value = ToAttributedValueConverter.class, strings = { "content" })
28 public class Server {
29     @XStreamAsAttribute
30     private final int requestId;
31     @XStreamAsAttribute
32     private final String machineId;
33     @XStreamAsAttribute
34     private final String machineName;
35     @XStreamAsAttribute
36     private final String osShort;
37     @XStreamAsAttribute
38     private final String osLong;
39     private final String content;
40
41     public Server(int requestId, String machineId, String machineName, String osShort, String osLong, String content) {
42         this.requestId = requestId;
43         this.machineId = machineId;
44         this.machineName = machineName;
45         this.osShort = osShort;
46         this.osLong = osLong;
47         this.content = content;
48     }
49
50     public int getRequestId() {
51         return requestId;
52     }
53
54     public String getMachineId() {
55         return machineId;
56     }
57
58     public String getOsShort() {
59         return osShort;
60     }
61
62     public String getOsLong() {
63         return osLong;
64     }
65
66     public String getContent() {
67         return content;
68     }
69
70     public Object getMachineName() {
71         return machineName;
72     }
73 }