]> git.basschouten.com Git - openhab-addons.git/blob
90929f1d3fbd2b963682c9154fca32cd9e0dc6a1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.nuki.internal.dataexchange;
14
15 import java.time.Instant;
16
17 /**
18  * The {@link NukiBaseResponse} class is the base class for API Responses.
19  *
20  * @author Markus Katter - Initial contribution
21  */
22 public class NukiBaseResponse {
23
24     private int status;
25     private String message;
26     private boolean success;
27     private Instant created;
28
29     public NukiBaseResponse(int status, String message) {
30         this.status = status;
31         this.message = message;
32         this.created = Instant.now();
33     }
34
35     public int getStatus() {
36         return status;
37     }
38
39     public void setStatus(int status) {
40         this.status = status;
41     }
42
43     public String getMessage() {
44         return message;
45     }
46
47     public void setMessage(String message) {
48         this.message = message;
49     }
50
51     public boolean isSuccess() {
52         return success;
53     }
54
55     public void setSuccess(boolean success) {
56         this.success = success;
57     }
58
59     public Instant getCreated() {
60         return this.created;
61     }
62 }