]> git.basschouten.com Git - openhab-addons.git/blob
501b68809e68c6d56de3919d72738272a26e4319
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.homeconnect.internal.client.model;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  *
22  * HTTP response model.
23  *
24  * @author Jonas BrĂ¼stel - Initial Contribution
25  */
26 @NonNullByDefault
27 public class HomeConnectResponse {
28     private final int code;
29     private final Map<String, String> header;
30     private final @Nullable String body;
31
32     public HomeConnectResponse(int code, Map<String, String> header, @Nullable String body) {
33         this.code = code;
34         this.header = header;
35         this.body = body;
36     }
37
38     public int getCode() {
39         return code;
40     }
41
42     public Map<String, String> getHeader() {
43         return header;
44     }
45
46     public @Nullable String getBody() {
47         return body;
48     }
49
50     @Override
51     public String toString() {
52         return "Response [code=" + code + ", header=" + header + ", body=" + body + "]";
53     }
54 }