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.miele.internal.api.dto;
15 import java.util.Map.Entry;
17 import com.google.gson.JsonElement;
18 import com.google.gson.JsonObject;
21 * The {@link DeviceMetaData} class represents the Metadata node in the response JSON.
23 * @author Jacob Laursen - Initial contribution
25 public class DeviceMetaData {
27 public String description;
28 public String LocalizedID;
29 public String LocalizedValue;
30 public JsonObject MieleEnum;
33 public String getMieleEnum(String s) {
34 if (this.MieleEnum == null) {
38 for (Entry<String, JsonElement> enumEntry : this.MieleEnum.entrySet()) {
39 if (enumEntry.getValue().getAsString().trim().equals(s.trim())) {
40 return enumEntry.getKey();