2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.ecovacs.internal.api.impl.dto.response.portal;
15 import com.google.gson.annotations.SerializedName;
18 * @author Danny Baumann - Initial contribution
20 public class IotProduct {
21 @SerializedName("classid")
22 private final String classId;
24 @SerializedName("product")
25 private final ProductDefinition productDef;
27 public IotProduct(String classId, ProductDefinition productDef) {
28 this.classId = classId;
29 this.productDef = productDef;
32 public String getClassId() {
36 public ProductDefinition getDefinition() {
40 public static class ProductDefinition {
41 @SerializedName("_id")
42 public final String id;
44 @SerializedName("materialNo")
45 public final String materialNumber;
47 @SerializedName("name")
48 public final String name;
50 @SerializedName("icon")
51 public final String icon;
53 @SerializedName("iconUrl")
54 public final String iconUrl;
56 @SerializedName("model")
57 public final String model;
59 @SerializedName("UILogicId")
60 public final String uiLogicId;
62 @SerializedName("ota")
63 public final boolean otaCapable;
65 @SerializedName("supportType")
66 public final SupportFlags supportFlags;
68 public ProductDefinition(String id, String materialNumber, String name, String icon, String iconUrl,
69 String model, String uiLogicId, boolean otaCapable, SupportFlags supportFlags) {
71 this.materialNumber = materialNumber;
74 this.iconUrl = iconUrl;
76 this.uiLogicId = uiLogicId;
77 this.otaCapable = otaCapable;
78 this.supportFlags = supportFlags;
82 public static class SupportFlags {
83 @SerializedName("share")
84 public final boolean canShare;
86 @SerializedName("tmjl")
87 public final boolean tmjl; // ???
89 @SerializedName("assistant")
90 public final boolean canUseAssistant;
92 @SerializedName("alexa")
93 public final boolean canUseAlexa;
95 public SupportFlags(boolean share, boolean tmjl, boolean assistant, boolean alexa) {
96 this.canShare = share;
98 this.canUseAssistant = assistant;
99 this.canUseAlexa = alexa;