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.unifi.internal.api.model;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link UniFiSite} represents the data model of a UniFi site.
20 * @author Matthew Bowman - Initial contribution
22 public class UniFiSite {
24 private final transient UniFiController controller;
26 public UniFiSite(UniFiController controller) {
27 this.controller = controller;
30 @SerializedName("_id")
37 public String getId() {
41 public String getName() {
45 public String getDescription() {
49 public boolean matchesName(String siteName) {
50 return siteName.equalsIgnoreCase(desc) || siteName.equalsIgnoreCase(name) || siteName.equalsIgnoreCase(id);
54 public String toString() {
55 return String.format("UniFiSite{name: '%s', desc: '%s'}", name, desc);