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.io.neeo.internal.models;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.io.neeo.internal.NeeoUtil;
19 * The model representing an adapter registration (serialize/deserialize json use only).
21 * @author Tim Roberts - Initial Contribution
24 public class NeeoAdapterRegistration {
27 private final String name;
29 /** The callback url */
30 private final String baseUrl;
33 * Creates the adapter registration from the name and callback url
35 * @param name the name
36 * @param baseUrl the base url
38 public NeeoAdapterRegistration(String name, String baseUrl) {
39 NeeoUtil.requireNotEmpty(name, "name cannot be empty");
40 NeeoUtil.requireNotEmpty(baseUrl, "baseUrl cannot be empty");
43 this.baseUrl = baseUrl;
51 public String getName() {
56 * Gets the callback url.
58 * @return the callback url
60 public String getBaseUrl() {
65 public String toString() {
66 return "NeeoAdapterRegistration [name=" + name + ", baseUrl=" + baseUrl + "]";