2 * Copyright (c) 2010-2024 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.amplipi.internal.model;
15 import java.util.ArrayList;
16 import java.util.List;
18 import io.swagger.v3.oas.annotations.media.Schema;
20 public class ValidationError {
22 @Schema(required = true)
23 private List<String> loc = new ArrayList<String>();
25 @Schema(required = true)
28 @Schema(required = true)
36 public List<String> getLoc() {
40 public void setLoc(List<String> loc) {
44 public ValidationError loc(List<String> loc) {
49 public ValidationError addLocItem(String locItem) {
50 this.loc.add(locItem);
59 public String getMsg() {
63 public void setMsg(String msg) {
67 public ValidationError msg(String msg) {
77 public String getType() {
81 public void setType(String type) {
85 public ValidationError type(String type) {
91 public String toString() {
92 StringBuilder sb = new StringBuilder();
93 sb.append("class ValidationError {\n");
95 sb.append(" loc: ").append(toIndentedString(loc)).append("\n");
96 sb.append(" msg: ").append(toIndentedString(msg)).append("\n");
97 sb.append(" type: ").append(toIndentedString(type)).append("\n");
103 * Convert the given object to string with each line indented by 4 spaces
104 * (except the first line).
106 private static String toIndentedString(Object o) {
110 return o.toString().replace("\n", "\n ");