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.hue.internal.api.dto.clip1;
15 import static org.openhab.binding.hue.internal.HueBindingConstants.NORMALIZE_ID_REGEX;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
20 import com.google.gson.annotations.SerializedName;
23 * Detailed information about an object on the Hue Bridge
25 * @author Samuel Leisering - Initial contribution
26 * @author Christoph Weitkamp - Initial contribution
29 public class FullHueObject extends HueObject {
31 private @NonNullByDefault({}) String type;
32 private @Nullable String modelid;
33 @SerializedName("manufacturername")
34 private @NonNullByDefault({}) String manufacturerName;
35 @SerializedName("productname")
36 private @NonNullByDefault({}) String productName;
37 private @Nullable String swversion;
38 private @Nullable String uniqueid;
40 public FullHueObject() {
45 * Returns the type of the object.
49 public String getType() {
54 * Set the type of the object.
56 public void setType(final String type) {
61 * Returns the model ID of the object.
65 public @Nullable String getModelID() {
69 public @Nullable String getNormalizedModelID() {
70 String modelid = this.modelid;
71 return modelid != null ? modelid.replaceAll(NORMALIZE_ID_REGEX, "_") : modelid;
75 * Set the model ID of the object.
77 public void setModelID(final String modelId) {
78 this.modelid = modelId;
81 public String getManufacturerName() {
82 return manufacturerName;
85 public void setManufacturerName(String manufacturerName) {
86 this.manufacturerName = manufacturerName;
89 public String getProductName() {
93 public void setProductName(String productName) {
94 this.productName = productName;
98 * Returns the software version of the object.
100 * @return software version
102 public @Nullable String getSoftwareVersion() {
107 * Returns the unique id of the object. The unique is the MAC address of the device with a unique endpoint id in the
108 * form: AA:BB:CC:DD:EE:FF:00:11-XX
110 * @return the unique id, can be null for some virtual types like the daylight sensor
112 public @Nullable String getUniqueID() {
117 * Sets the unique id of the object.
119 public void setUniqueID(final String uniqueid) {
120 this.uniqueid = uniqueid;