]> git.basschouten.com Git - openhab-addons.git/blob
9ec3854759b75850b1d8851706327c47a6fc5bfa
[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.enphase.internal.dto;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * @author Hilbrand Bouwkamp - Initial contribution
19  */
20 public class InventoryJsonDTO {
21
22     public class DeviceDTO {
23         public String type;
24
25         @SerializedName("part_num")
26         public String partNumber;
27         @SerializedName("serial_num")
28         public String serialNumber;
29
30         @SerializedName("device_status")
31         private String[] deviceStatus;
32         @SerializedName("last_rpt_date")
33         public String lastReportDate;
34         public boolean producing;
35         public boolean communicating;
36         public boolean provisioned;
37         public boolean operating;
38         // NSRB data
39         public String relay;
40         @SerializedName("line1-connected")
41         public boolean line1Connected;
42         @SerializedName("line2-connected")
43         public boolean line2Connected;
44         @SerializedName("line3-connected")
45         public boolean line3Connected;
46
47         public String getSerialNumber() {
48             return serialNumber;
49         }
50
51         public String getDeviceStatus() {
52             return deviceStatus == null || deviceStatus.length == 0 ? "" : deviceStatus[0];
53         }
54     }
55
56     public String type;
57     public DeviceDTO[] devices;
58 }