2 * Copyright (c) 2010-2023 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.boschshc.internal.services.dto;
16 * Generic error response of the Bosch REST API.
18 * @author Christian Oeing - Initial contribution
20 public class JsonRestExceptionResponse extends BoschSHCServiceState {
23 * The entity could not be found. One of the defined path parameters was invalid.
25 public static final String ENTITY_NOT_FOUND = "ENTITY_NOT_FOUND";
27 public JsonRestExceptionResponse() {
28 super("JsonRestExceptionResponseEntity");
34 * The error code of the occurred Exception.
36 public String errorCode;
39 * The HTTP status of the error.
41 public Integer statusCode;
43 public static boolean isValid(JsonRestExceptionResponse obj) {
44 return obj != null && obj.errorCode != null && obj.statusCode != null;