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.binding.nuki.internal.dataexchange;
15 import java.time.Instant;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link NukiBaseResponse} class is the base class for API Responses.
23 * @author Markus Katter - Initial contribution
26 public class NukiBaseResponse {
30 private String message;
31 private boolean success;
32 private Instant created;
34 public NukiBaseResponse(int status, @Nullable String message) {
36 this.message = message;
37 this.created = Instant.now();
40 public int getStatus() {
44 public void setStatus(int status) {
48 public @Nullable String getMessage() {
52 public void setMessage(String message) {
53 this.message = message;
56 public boolean isSuccess() {
60 public void setSuccess(boolean success) {
61 this.success = success;
64 public Instant getCreated() {