]> git.basschouten.com Git - openhab-addons.git/blob
7868c749e37d5d96e49cf6db9589dbe8033321e4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.lametrictime.internal.api.local.dto;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 /**
19  * Pojo for failure.
20  *
21  * @author Gregory Moyer - Initial contribution
22  */
23 public class Failure {
24     private List<Error> errors = new ArrayList<Error>();
25
26     public List<Error> getErrors() {
27         return errors;
28     }
29
30     public void setErrors(List<Error> errors) {
31         this.errors = errors;
32     }
33
34     public Failure withErrors(List<Error> errors) {
35         this.errors = errors;
36         return this;
37     }
38
39     @Override
40     public String toString() {
41         StringBuilder builder = new StringBuilder();
42         builder.append("Failure [errors=");
43         builder.append(errors);
44         builder.append("]");
45         return builder.toString();
46     }
47 }