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