org.onap migration
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / MsoExceptionResponse.java
1 package org.onap.vid.model;
2
3 public class MsoExceptionResponse {
4
5     public static class ServiceException {
6
7         public ServiceException(String messageId, String text) {
8             this.messageId = messageId;
9             this.text = text;
10         }
11
12         public ServiceException() {
13         }
14
15         public String messageId;
16         public String text;
17     }
18
19     public ServiceException serviceException;
20
21     public MsoExceptionResponse() {
22     }
23
24     public MsoExceptionResponse(String messageId, String text) {
25         this.serviceException = new ServiceException(messageId, text);
26     }
27
28     public MsoExceptionResponse(Exception exception) {
29         ExceptionResponse exceptionResponse = new ExceptionResponse(exception);
30         this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage());
31     }
32 }