063f75679c3a5ac872f1d02b0d3852601896e603
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / openecomp / mso / bpmn / common / adapter / vnf / DeleteVnfNotification.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP - SO\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.mso.bpmn.common.adapter.vnf;\r
22 \r
23 import javax.xml.bind.annotation.XmlAccessType;\r
24 import javax.xml.bind.annotation.XmlAccessorType;\r
25 import javax.xml.bind.annotation.XmlElement;\r
26 import javax.xml.bind.annotation.XmlType;\r
27 \r
28 \r
29 /**\r
30  * <p>Java class for deleteVnfNotification complex type.\r
31  * \r
32  * <p>The following schema fragment specifies the expected content contained within this class.\r
33  * \r
34  * <pre>\r
35  * &lt;complexType name="deleteVnfNotification">\r
36  *   &lt;complexContent>\r
37  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
38  *       &lt;sequence>\r
39  *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>\r
40  *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>\r
41  *         &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>\r
42  *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>\r
43  *       &lt;/sequence>\r
44  *     &lt;/restriction>\r
45  *   &lt;/complexContent>\r
46  * &lt;/complexType>\r
47  * </pre>\r
48  * \r
49  * \r
50  */\r
51 @XmlAccessorType(XmlAccessType.FIELD)\r
52 @XmlType(name = "deleteVnfNotification1", propOrder = {\r
53     "messageId",\r
54     "completed",\r
55     "exception",\r
56     "errorMessage"\r
57 })\r
58 public class DeleteVnfNotification {\r
59 \r
60     @XmlElement(required = true)\r
61     protected String messageId;\r
62     protected boolean completed;\r
63     protected MsoExceptionCategory exception;\r
64     protected String errorMessage;\r
65 \r
66     /**\r
67      * Gets the value of the messageId property.\r
68      * \r
69      * @return\r
70      *     possible object is\r
71      *     {@link String }\r
72      *     \r
73      */\r
74     public String getMessageId() {\r
75         return messageId;\r
76     }\r
77 \r
78     /**\r
79      * Sets the value of the messageId property.\r
80      * \r
81      * @param value\r
82      *     allowed object is\r
83      *     {@link String }\r
84      *     \r
85      */\r
86     public void setMessageId(String value) {\r
87         this.messageId = value;\r
88     }\r
89 \r
90     /**\r
91      * Gets the value of the completed property.\r
92      * \r
93      */\r
94     public boolean isCompleted() {\r
95         return completed;\r
96     }\r
97 \r
98     /**\r
99      * Sets the value of the completed property.\r
100      * \r
101      */\r
102     public void setCompleted(boolean value) {\r
103         this.completed = value;\r
104     }\r
105 \r
106     /**\r
107      * Gets the value of the exception property.\r
108      * \r
109      * @return\r
110      *     possible object is\r
111      *     {@link MsoExceptionCategory }\r
112      *     \r
113      */\r
114     public MsoExceptionCategory getException() {\r
115         return exception;\r
116     }\r
117 \r
118     /**\r
119      * Sets the value of the exception property.\r
120      * \r
121      * @param value\r
122      *     allowed object is\r
123      *     {@link MsoExceptionCategory }\r
124      *     \r
125      */\r
126     public void setException(MsoExceptionCategory value) {\r
127         this.exception = value;\r
128     }\r
129 \r
130     /**\r
131      * Gets the value of the errorMessage property.\r
132      * \r
133      * @return\r
134      *     possible object is\r
135      *     {@link String }\r
136      *     \r
137      */\r
138     public String getErrorMessage() {\r
139         return errorMessage;\r
140     }\r
141 \r
142     /**\r
143      * Sets the value of the errorMessage property.\r
144      * \r
145      * @param value\r
146      *     allowed object is\r
147      *     {@link String }\r
148      *     \r
149      */\r
150     public void setErrorMessage(String value) {\r
151         this.errorMessage = value;\r
152     }\r
153 \r
154     /**\r
155      * Overrides toString() method \r
156      * @return String type (deleteVnfNotification)\r
157      */\r
158  \r
159     \r
160         public String toString() {\r
161         String deleteVnfNotification = "";\r
162         if (exception==null) {\r
163                 deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +\r
164                                        "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +\r
165                                        "   <messageId>"+messageId+"</messageId>" + '\n' +\r
166                                        "   <completed>"+completed+"</completed>" + '\n' +\r
167                                        "</ns2:deleteVnfNotification>";\r
168         } else {\r
169                 deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +\r
170                                        "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +\r
171                                        "   <messageId>"+messageId+"</messageId>" + '\n' +\r
172                                        "   <completed>"+completed+"</completed>" + '\n' +\r
173                                    "   <exception>"+exception+"</exception>" + '\n' +\r
174                                    "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +\r
175                                        "</ns2:deleteVnfNotification>";\r
176         }\r
177         return deleteVnfNotification;\r
178         }    \r
179 \r
180 /*      \r
181         public String toString() {\r
182                 StringWriter writer = new StringWriter();\r
183                 try {\r
184                         JAXBContext context = JAXBContext\r
185                                         .newInstance(DeleteVnfNotification.class);\r
186                         Marshaller m = context.createMarshaller();\r
187                         m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);\r
188                         m.marshal(this, writer);\r
189                         //System.out.println("toString() - " + writer.getBuffer().toString());                  \r
190                         return writer.getBuffer().toString();\r
191                 } catch (JAXBException e) {\r
192                         //System.out.println("JAXBException - " + e.getStackTrace());                   \r
193                         return "";\r
194                 }\r
195         }    \r
196 */      \r
197         \r
198 }\r