1 package org.oxerr.vividseats.client.rescu.resource;
2
3 import java.io.Serializable;
4
5 import com.fasterxml.jackson.annotation.JsonProperty;
6
7 import si.mazi.rescu.ExceptionalReturnContentException;
8
9
10
11
12 public class Response implements Serializable {
13
14 private static final long serialVersionUID = 2024092601L;
15
16 private Boolean success;
17
18 private String message;
19
20 public Response(
21 @JsonProperty("success") Boolean success,
22 @JsonProperty("message") String message
23 ) {
24 if (!success.booleanValue()) {
25 throw new ExceptionalReturnContentException(message);
26 }
27 }
28
29 public Boolean getSuccess() {
30 return success;
31 }
32
33 public void setSuccess(Boolean success) {
34 this.success = success;
35 }
36
37 public String getMessage() {
38 return message;
39 }
40
41 public void setMessage(String message) {
42 this.message = message;
43 }
44
45 }