]> git.basschouten.com Git - openhab-addons.git/blob
45105eb41059c1be46bbec077ef25817e22d150a
[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.amplipi.internal.model;
14
15 import java.util.List;
16
17 import io.swagger.v3.oas.annotations.media.Schema;
18
19 public class HTTPValidationError {
20
21     @Schema
22     private List<ValidationError> detail = null;
23
24     /**
25      * Get detail
26      *
27      * @return detail
28      **/
29     public List<ValidationError> getDetail() {
30         return detail;
31     }
32
33     public void setDetail(List<ValidationError> detail) {
34         this.detail = detail;
35     }
36
37     public HTTPValidationError detail(List<ValidationError> detail) {
38         this.detail = detail;
39         return this;
40     }
41
42     public HTTPValidationError addDetailItem(ValidationError detailItem) {
43         this.detail.add(detailItem);
44         return this;
45     }
46
47     @Override
48     public String toString() {
49         StringBuilder sb = new StringBuilder();
50         sb.append("class HTTPValidationError {\n");
51
52         sb.append("    detail: ").append(toIndentedString(detail)).append("\n");
53         sb.append("}");
54         return sb.toString();
55     }
56
57     /**
58      * Convert the given object to string with each line indented by 4 spaces
59      * (except the first line).
60      */
61     private static String toIndentedString(Object o) {
62         if (o == null) {
63             return "null";
64         }
65         return o.toString().replace("\n", "\n    ");
66     }
67 }