2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.bpmn.common.adapter.vnf;
23 import java.util.ArrayList;
24 import java.util.List;
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;
33 * <p>Java class for createVnfNotification complex type.
35 * <p>The following schema fragment specifies the expected content contained within this class.
38 * <complexType name="createVnfNotification">
40 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
42 * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
43 * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
44 * <element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
45 * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
46 * <element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
47 * <element name="outputs" minOccurs="0">
50 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
52 * <element name="entry" maxOccurs="unbounded" minOccurs="0">
55 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
57 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
58 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
61 * </complexContent>
66 * </complexContent>
69 * <element name="rollback" type="{http://org.openecomp.mso/vnfNotify}vnfRollback" minOccurs="0"/>
72 * </complexContent>
78 @XmlAccessorType(XmlAccessType.FIELD)
79 @XmlType(name = "createVnfNotification1", propOrder = {
88 public class CreateVnfNotification {
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;
100 * Gets the value of the messageId property.
107 public String getMessageId() {
112 * Sets the value of the messageId property.
119 public void setMessageId(String value) {
120 this.messageId = value;
124 * Gets the value of the completed property.
127 public boolean isCompleted() {
132 * Sets the value of the completed property.
135 public void setCompleted(boolean value) {
136 this.completed = value;
140 * Gets the value of the exception property.
144 * {@link MsoExceptionCategory }
147 public MsoExceptionCategory getException() {
152 * Sets the value of the exception property.
156 * {@link MsoExceptionCategory }
159 public void setException(MsoExceptionCategory value) {
160 this.exception = value;
164 * Gets the value of the errorMessage property.
171 public String getErrorMessage() {
176 * Sets the value of the errorMessage property.
183 public void setErrorMessage(String value) {
184 this.errorMessage = value;
188 * Gets the value of the vnfId property.
195 public String getVnfId() {
200 * Sets the value of the vnfId property.
207 public void setVnfId(String value) {
212 * Gets the value of the outputs property.
216 * {@link CreateVnfNotification.Outputs }
219 public CreateVnfNotification.Outputs getOutputs() {
224 * Sets the value of the outputs property.
228 * {@link CreateVnfNotification.Outputs }
231 public void setOutputs(CreateVnfNotification.Outputs value) {
232 this.outputs = value;
236 * Gets the value of the rollback property.
240 * {@link VnfRollback }
243 public VnfRollback getRollback() {
248 * Sets the value of the rollback property.
252 * {@link VnfRollback }
255 public void setRollback(VnfRollback value) {
256 this.rollback = value;
261 * <p>Java class for anonymous complex type.
263 * <p>The following schema fragment specifies the expected content contained within this class.
267 * <complexContent>
268 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
270 * <element name="entry" maxOccurs="unbounded" minOccurs="0">
272 * <complexContent>
273 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
275 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
276 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
279 * </complexContent>
284 * </complexContent>
290 @XmlAccessorType(XmlAccessType.FIELD)
291 @XmlType(name = "", propOrder = {
294 public static class Outputs {
296 protected List<CreateVnfNotification.Outputs.Entry> entry;
299 * Gets the value of the entry property.
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.
308 * For example, to add a new item, do as follows:
310 * getEntry().add(newItem);
315 * Objects of the following type(s) are allowed in the list
316 * {@link CreateVnfNotification.Outputs.Entry }
320 public List<CreateVnfNotification.Outputs.Entry> getEntry() {
322 entry = new ArrayList<CreateVnfNotification.Outputs.Entry>();
327 // Not a generated method
328 public String toString() {
329 StringBuilder out = new StringBuilder();
330 out.append("<outputs>\n");
332 for (Entry e : entry) {
333 out.append(e.toString());
337 out.append("</outputs>");
338 return out.toString();
342 * <p>Java class for anonymous complex type.
344 * <p>The following schema fragment specifies the expected content contained within this class.
348 * <complexContent>
349 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
351 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
352 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
355 * </complexContent>
361 @XmlAccessorType(XmlAccessType.FIELD)
362 @XmlType(name = "", propOrder = {
366 public static class Entry {
368 protected String key;
369 protected String value;
372 * Gets the value of the key property.
379 public String getKey() {
384 * Sets the value of the key property.
391 public void setKey(String value) {
396 * Gets the value of the value property.
403 public String getValue() {
408 * Sets the value of the value property.
415 public void setValue(String value) {
420 // Not a generated method
421 public String toString() {
425 " <key>"+key+"</key>" + '\n' +
426 " <value>"+value+"</value>" + '\n' +
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>";
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>";
457 return createVnfNotification;