]> git.basschouten.com Git - openhab-addons.git/blob
a5a48713763a2b2571d1267fa7bda1747b62d00a
[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.nuki.internal.dto;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNull;
19
20 /**
21  * The {@link WebApiBridgeDiscoveryDto} class defines the Data Transfer Object (POJO) for a response of
22  * the https://api.nuki.io/discover/bridges Web API.
23  *
24  * @author Jan Vybíral - Initial contribution
25  */
26 public class WebApiBridgeDiscoveryDto {
27     private List<WebApiBridgeDto> bridges;
28     private Integer errorCode;
29
30     @NonNull
31     public List<WebApiBridgeDto> getBridges() {
32         if (bridges == null) {
33             bridges = new ArrayList<>();
34         }
35         return bridges;
36     }
37
38     public void setBridges(List<WebApiBridgeDto> bridges) {
39         this.bridges = bridges;
40     }
41
42     public Integer getErrorCode() {
43         return errorCode;
44     }
45
46     public void setErrorCode(Integer errorCode) {
47         this.errorCode = errorCode;
48     }
49
50     @Override
51     public String toString() {
52         return "WebApiBridgeDiscoveryDto{" + "bridges=" + bridges + ", errorCode=" + errorCode + '}';
53     }
54 }