2 * Copyright (c) 2010-2022 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.miio.internal.miot;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.Expose;
19 import com.google.gson.annotations.SerializedName;
22 * Mapping properties from json for miot device info
24 * @author Marcel Verpaalen - Initial contribution
27 public class OptionsValueDescriptionsListDTO {
29 @SerializedName("value")
33 @SerializedName("description")
36 public String description;
38 public int getValue() {
39 final Integer val = this.value;
40 return val != null ? val.intValue() : 0;
43 public void setValue(Integer value) {
47 public String getDescription() {
48 final String description = this.description;
49 return description != null ? description : "";
52 public void setDescription(String description) {
53 this.description = description;