Change the header to SO
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / openecomp / mso / bpmn / common / adapter / vnf / CreateVnfNotification.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.openecomp.mso.bpmn.common.adapter.vnf;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26 import javax.xml.bind.annotation.XmlAccessType;
27 import javax.xml.bind.annotation.XmlAccessorType;
28 import javax.xml.bind.annotation.XmlElement;
29 import javax.xml.bind.annotation.XmlType;
30
31
32 /**
33  * <p>Java class for createVnfNotification complex type.
34  * 
35  * <p>The following schema fragment specifies the expected content contained within this class.
36  * 
37  * <pre>
38  * &lt;complexType name="createVnfNotification">
39  *   &lt;complexContent>
40  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
41  *       &lt;sequence>
42  *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
43  *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
44  *         &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
45  *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
46  *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
47  *         &lt;element name="outputs" minOccurs="0">
48  *           &lt;complexType>
49  *             &lt;complexContent>
50  *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
51  *                 &lt;sequence>
52  *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
53  *                     &lt;complexType>
54  *                       &lt;complexContent>
55  *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
56  *                           &lt;sequence>
57  *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
58  *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
59  *                           &lt;/sequence>
60  *                         &lt;/restriction>
61  *                       &lt;/complexContent>
62  *                     &lt;/complexType>
63  *                   &lt;/element>
64  *                 &lt;/sequence>
65  *               &lt;/restriction>
66  *             &lt;/complexContent>
67  *           &lt;/complexType>
68  *         &lt;/element>
69  *         &lt;element name="rollback" type="{http://org.openecomp.mso/vnfNotify}vnfRollback" minOccurs="0"/>
70  *       &lt;/sequence>
71  *     &lt;/restriction>
72  *   &lt;/complexContent>
73  * &lt;/complexType>
74  * </pre>
75  * 
76  * 
77  */
78 @XmlAccessorType(XmlAccessType.FIELD)
79 @XmlType(name = "createVnfNotification1", propOrder = {
80     "messageId",
81     "completed",
82     "exception",
83     "errorMessage",
84     "vnfId",
85     "outputs",
86     "rollback"
87 })
88 public class CreateVnfNotification {
89
90     @XmlElement(required = true)
91     protected String messageId;
92     protected boolean completed;
93     protected MsoExceptionCategory exception;
94     protected String errorMessage;
95     protected String vnfId;
96     protected CreateVnfNotification.Outputs outputs;
97     protected VnfRollback rollback;
98
99     /**
100      * Gets the value of the messageId property.
101      * 
102      * @return
103      *     possible object is
104      *     {@link String }
105      *     
106      */
107     public String getMessageId() {
108         return messageId;
109     }
110
111     /**
112      * Sets the value of the messageId property.
113      * 
114      * @param value
115      *     allowed object is
116      *     {@link String }
117      *     
118      */
119     public void setMessageId(String value) {
120         this.messageId = value;
121     }
122
123     /**
124      * Gets the value of the completed property.
125      * 
126      */
127     public boolean isCompleted() {
128         return completed;
129     }
130
131     /**
132      * Sets the value of the completed property.
133      * 
134      */
135     public void setCompleted(boolean value) {
136         this.completed = value;
137     }
138
139     /**
140      * Gets the value of the exception property.
141      * 
142      * @return
143      *     possible object is
144      *     {@link MsoExceptionCategory }
145      *     
146      */
147     public MsoExceptionCategory getException() {
148         return exception;
149     }
150
151     /**
152      * Sets the value of the exception property.
153      * 
154      * @param value
155      *     allowed object is
156      *     {@link MsoExceptionCategory }
157      *     
158      */
159     public void setException(MsoExceptionCategory value) {
160         this.exception = value;
161     }
162
163     /**
164      * Gets the value of the errorMessage property.
165      * 
166      * @return
167      *     possible object is
168      *     {@link String }
169      *     
170      */
171     public String getErrorMessage() {
172         return errorMessage;
173     }
174
175     /**
176      * Sets the value of the errorMessage property.
177      * 
178      * @param value
179      *     allowed object is
180      *     {@link String }
181      *     
182      */
183     public void setErrorMessage(String value) {
184         this.errorMessage = value;
185     }
186
187     /**
188      * Gets the value of the vnfId property.
189      * 
190      * @return
191      *     possible object is
192      *     {@link String }
193      *     
194      */
195     public String getVnfId() {
196         return vnfId;
197     }
198
199     /**
200      * Sets the value of the vnfId property.
201      * 
202      * @param value
203      *     allowed object is
204      *     {@link String }
205      *     
206      */
207     public void setVnfId(String value) {
208         this.vnfId = value;
209     }
210
211     /**
212      * Gets the value of the outputs property.
213      * 
214      * @return
215      *     possible object is
216      *     {@link CreateVnfNotification.Outputs }
217      *     
218      */
219     public CreateVnfNotification.Outputs getOutputs() {
220         return outputs;
221     }
222
223     /**
224      * Sets the value of the outputs property.
225      * 
226      * @param value
227      *     allowed object is
228      *     {@link CreateVnfNotification.Outputs }
229      *     
230      */
231     public void setOutputs(CreateVnfNotification.Outputs value) {
232         this.outputs = value;
233     }
234
235     /**
236      * Gets the value of the rollback property.
237      * 
238      * @return
239      *     possible object is
240      *     {@link VnfRollback }
241      *     
242      */
243     public VnfRollback getRollback() {
244         return rollback;
245     }
246
247     /**
248      * Sets the value of the rollback property.
249      * 
250      * @param value
251      *     allowed object is
252      *     {@link VnfRollback }
253      *     
254      */
255     public void setRollback(VnfRollback value) {
256         this.rollback = value;
257     }
258
259
260     /**
261      * <p>Java class for anonymous complex type.
262      * 
263      * <p>The following schema fragment specifies the expected content contained within this class.
264      * 
265      * <pre>
266      * &lt;complexType>
267      *   &lt;complexContent>
268      *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
269      *       &lt;sequence>
270      *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
271      *           &lt;complexType>
272      *             &lt;complexContent>
273      *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
274      *                 &lt;sequence>
275      *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
276      *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
277      *                 &lt;/sequence>
278      *               &lt;/restriction>
279      *             &lt;/complexContent>
280      *           &lt;/complexType>
281      *         &lt;/element>
282      *       &lt;/sequence>
283      *     &lt;/restriction>
284      *   &lt;/complexContent>
285      * &lt;/complexType>
286      * </pre>
287      * 
288      * 
289      */
290     @XmlAccessorType(XmlAccessType.FIELD)
291     @XmlType(name = "", propOrder = {
292         "entry"
293     })
294     public static class Outputs {
295
296         protected List<CreateVnfNotification.Outputs.Entry> entry;
297         
298         /**
299          * Gets the value of the entry property.
300          * 
301          * <p>
302          * This accessor method returns a reference to the live list,
303          * not a snapshot. Therefore any modification you make to the
304          * returned list will be present inside the JAXB object.
305          * This is why there is not a <CODE>set</CODE> method for the entry property.
306          * 
307          * <p>
308          * For example, to add a new item, do as follows:
309          * <pre>
310          *    getEntry().add(newItem);
311          * </pre>
312          * 
313          * 
314          * <p>
315          * Objects of the following type(s) are allowed in the list
316          * {@link CreateVnfNotification.Outputs.Entry }
317          * 
318          * 
319          */
320         public List<CreateVnfNotification.Outputs.Entry> getEntry() {
321             if (entry == null) {
322                 entry = new ArrayList<CreateVnfNotification.Outputs.Entry>();
323             }
324             return this.entry;
325         }
326
327         // Not a generated method
328         public String toString() {
329                 StringBuilder out = new StringBuilder();
330                 out.append("<outputs>\n");
331                 if (entry != null) {
332                         for (Entry e : entry) {
333                                 out.append(e.toString());
334                                 out.append('\n');
335                         }
336                 }
337                 out.append("</outputs>");
338                 return out.toString();
339         }
340
341         /**
342          * <p>Java class for anonymous complex type.
343          * 
344          * <p>The following schema fragment specifies the expected content contained within this class.
345          * 
346          * <pre>
347          * &lt;complexType>
348          *   &lt;complexContent>
349          *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
350          *       &lt;sequence>
351          *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
352          *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
353          *       &lt;/sequence>
354          *     &lt;/restriction>
355          *   &lt;/complexContent>
356          * &lt;/complexType>
357          * </pre>
358          * 
359          * 
360          */
361         @XmlAccessorType(XmlAccessType.FIELD)
362         @XmlType(name = "", propOrder = {
363             "key",
364             "value"
365         })
366         public static class Entry {
367
368             protected String key;
369             protected String value;
370
371             /**
372              * Gets the value of the key property.
373              * 
374              * @return
375              *     possible object is
376              *     {@link String }
377              *     
378              */
379             public String getKey() {
380                 return key;
381             }
382
383             /**
384              * Sets the value of the key property.
385              * 
386              * @param value
387              *     allowed object is
388              *     {@link String }
389              *     
390              */
391             public void setKey(String value) {
392                 this.key = value;
393             }
394
395             /**
396              * Gets the value of the value property.
397              * 
398              * @return
399              *     possible object is
400              *     {@link String }
401              *     
402              */
403             public String getValue() {
404                 return value;
405             }
406
407             /**
408              * Sets the value of the value property.
409              * 
410              * @param value
411              *     allowed object is
412              *     {@link String }
413              *     
414              */
415             public void setValue(String value) {
416                 this.value = value;
417                 
418             }
419             
420             // Not a generated method
421             public String toString() {
422                 String entry = "";
423                         entry =
424                "<entry>"+ '\n' +
425                "   <key>"+key+"</key>" + '\n' +
426                "   <value>"+value+"</value>" + '\n' +
427                "</entry>";
428                 return entry; 
429             }
430
431         }
432
433     }
434
435     // Not a generated method
436         public String toString() {
437         String createVnfNotification = "";
438         if (exception==null) {
439                 createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
440                                        "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
441                                        "   <messageId>"+messageId+"</messageId>" + '\n' +
442                                        "   <completed>"+completed+"</completed>" + '\n' +
443                                        "   <vnfId>"+vnfId+"</vnfId>" + '\n' +
444                                        (outputs == null ? "" : outputs.toString() + '\n') +
445                                        "   <rollback>"+rollback+"</rollback>" + '\n' +
446                                        "</ns2:createVnfNotification>";
447         } else {
448                 createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
449                                        "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
450                                        "   <messageId>"+messageId+"</messageId>" + '\n' +
451                                        "   <completed>"+completed+"</completed>" + '\n' +
452                                        (outputs == null ? "" : outputs.toString() + '\n') +
453                                    "   <exception>"+exception+"</exception>" + '\n' +
454                                    "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
455                                        "</ns2:createVnfNotification>";
456         }
457         return createVnfNotification;
458         }    
459 }