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.plugwiseha.internal.api.model.dto;
15 import com.thoughtworks.xstream.annotations.XStreamAlias;
16 import com.thoughtworks.xstream.annotations.XStreamImplicit;
19 * @author B. van Wetten - Initial contribution
21 @XStreamAlias("domain_objects")
22 public class DomainObjects {
24 @XStreamAlias("gateway")
25 private GatewayInfo gatewayInfo;
27 @XStreamImplicit(itemFieldName = "appliance", keyFieldName = "id")
28 private Appliances appliances = new Appliances();
30 @XStreamImplicit(itemFieldName = "location", keyFieldName = "id")
31 private Locations locations = new Locations();
33 @SuppressWarnings("unused")
34 @XStreamImplicit(itemFieldName = "module", keyFieldName = "id")
35 private Modules modules = new Modules();
37 public GatewayInfo getGatewayInfo() {
41 public Appliances getAppliances() {
45 public Locations getLocations() {
49 public Appliances mergeAppliances(Appliances updatedAppliances) {
50 if (updatedAppliances != null) {
51 this.appliances.merge(updatedAppliances);
54 return this.appliances;
57 public Locations mergeLocations(Locations updatedLocations) {
58 if (updatedLocations != null) {
59 this.locations.merge(updatedLocations);
62 return this.locations;