]> git.basschouten.com Git - openhab-addons.git/blob
70c985ed551e5a8384dc15892677cea6c99a92a8
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.livisismarthome.internal.client.api.entity;
14
15 import org.openhab.binding.livisismarthome.internal.client.api.entity.device.GatewayDTO;
16
17 /**
18  * Defines the structure of the status response
19  *
20  * @author Oliver Kuhl - Initial contribution
21  */
22 public class StatusResponseDTO {
23
24     /**
25      * The LIVISI SmartHome gateway. Can be null in case there is no registered for the current logged in user.
26      */
27     private GatewayDTO gateway;
28
29     /**
30      * Version of the configuration. Changes each time the configuration was changed via the LIVISI client app.
31      */
32     private String configVersion;
33
34     /**
35      * @return the configuration version
36      */
37     public String getConfigVersion() {
38         // SHC 2 returns a gateway element with the config version.
39         if (gateway != null) {
40             return gateway.getConfigVersion();
41         }
42         // SHC 1 (classic) has no gateway element, the configVersion is returned directly within the response object.
43         return configVersion;
44     }
45 }