/*
 * Copyright (c) 2010-2026 Contributors to the openHAB project
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package org.openhab.core.thing.dto;

import java.util.Map;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * This is a data transfer object that is used to serialize things.
 *
 * @author Dennis Nobel - Initial contribution
 * @author Thomas Höfer - Added thing and thing type properties
 * @author Stefan Bußweiler - Added new thing status handling
 * @author Simon Kaufmann - Added label
 * @author Wouter Born - Let (Enriched)ThingDTO extend AbstractThingDTO so both can define their own "channels" type
 * @author Andrew Fiddian-Green - Added semanticEquipmentTag
 */
public abstract class AbstractThingDTO {

    public String label;
    public String bridgeUID;
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    public Map<String, Object> configuration;
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    public Map<String, String> properties;
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    public String UID;
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    public String thingTypeUID;
    public String location;
    public String semanticEquipmentTag;

    protected AbstractThingDTO() {
    }

    protected AbstractThingDTO(String thingTypeUID, String uid, String label, String bridgeUID,
            Map<String, Object> configuration, Map<String, String> properties, String location,
            String semanticEquipmentTag) {
        this.thingTypeUID = thingTypeUID;
        this.UID = uid;
        this.label = label;
        this.bridgeUID = bridgeUID;
        this.configuration = configuration;
        this.properties = properties;
        this.location = location;
        this.semanticEquipmentTag = semanticEquipmentTag;
    }
}
