]> git.basschouten.com Git - openhab-addons.git/blob
cd0f4315514cb2c882443ddb62391898e0ae3b77
[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.ecovacs.internal.api.impl.dto.response.portal;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * @author Danny Baumann - Initial contribution
19  */
20 public class IotProduct {
21     @SerializedName("classid")
22     private final String classId;
23
24     @SerializedName("product")
25     private final ProductDefinition productDef;
26
27     public IotProduct(String classId, ProductDefinition productDef) {
28         this.classId = classId;
29         this.productDef = productDef;
30     }
31
32     public String getClassId() {
33         return classId;
34     }
35
36     public ProductDefinition getDefinition() {
37         return productDef;
38     }
39
40     public static class ProductDefinition {
41         @SerializedName("_id")
42         public final String id;
43
44         @SerializedName("materialNo")
45         public final String materialNumber;
46
47         @SerializedName("name")
48         public final String name;
49
50         @SerializedName("icon")
51         public final String icon;
52
53         @SerializedName("iconUrl")
54         public final String iconUrl;
55
56         @SerializedName("model")
57         public final String model;
58
59         @SerializedName("UILogicId")
60         public final String uiLogicId;
61
62         @SerializedName("ota")
63         public final boolean otaCapable;
64
65         @SerializedName("supportType")
66         public final SupportFlags supportFlags;
67
68         public ProductDefinition(String id, String materialNumber, String name, String icon, String iconUrl,
69                 String model, String uiLogicId, boolean otaCapable, SupportFlags supportFlags) {
70             this.id = id;
71             this.materialNumber = materialNumber;
72             this.name = name;
73             this.icon = icon;
74             this.iconUrl = iconUrl;
75             this.model = model;
76             this.uiLogicId = uiLogicId;
77             this.otaCapable = otaCapable;
78             this.supportFlags = supportFlags;
79         }
80     }
81
82     public static class SupportFlags {
83         @SerializedName("share")
84         public final boolean canShare;
85
86         @SerializedName("tmjl")
87         public final boolean tmjl; // ???
88
89         @SerializedName("assistant")
90         public final boolean canUseAssistant;
91
92         @SerializedName("alexa")
93         public final boolean canUseAlexa;
94
95         public SupportFlags(boolean share, boolean tmjl, boolean assistant, boolean alexa) {
96             this.canShare = share;
97             this.tmjl = tmjl;
98             this.canUseAssistant = assistant;
99             this.canUseAlexa = alexa;
100         }
101     }
102 }