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.onap.so.bpmn.common.adapter.vnf;
23 import java.util.ArrayList;
24 import java.util.List;
25 import javax.xml.bind.annotation.XmlAccessType;
26 import javax.xml.bind.annotation.XmlAccessorType;
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlType;
33 * Java class for createVnfNotification complex type.
36 * The following schema fragment specifies the expected content contained within this class.
39 * <complexType name="createVnfNotification">
41 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
44 * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
45 * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
46 * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
47 * <element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
48 * <element name="outputs" minOccurs="0">
51 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
53 * <element name="entry" maxOccurs="unbounded" minOccurs="0">
56 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
58 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
59 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
62 * </complexContent>
67 * </complexContent>
70 * <element name="rollback" type="{http://org.onap.so/vnfNotify}vnfRollback" minOccurs="0"/>
73 * </complexContent>
79 @XmlAccessorType(XmlAccessType.FIELD)
80 @XmlType(name = "createVnfNotification1",
81 propOrder = {"messageId", "completed", "exception", "errorMessage", "vnfId", "outputs", "rollback"})
82 public class CreateVnfNotification {
84 @XmlElement(required = true)
85 protected String messageId;
86 protected boolean completed;
87 protected MsoExceptionCategory exception;
88 protected String errorMessage;
89 protected String vnfId;
90 protected Outputs outputs;
91 protected VnfRollback rollback;
94 * Gets the value of the messageId property.
96 * @return possible object is {@link String }
99 public String getMessageId() {
104 * Sets the value of the messageId property.
106 * @param value allowed object is {@link String }
109 public void setMessageId(String value) {
110 this.messageId = value;
114 * Gets the value of the completed property.
117 public boolean isCompleted() {
122 * Sets the value of the completed property.
125 public void setCompleted(boolean value) {
126 this.completed = value;
130 * Gets the value of the exception property.
132 * @return possible object is {@link MsoExceptionCategory }
135 public MsoExceptionCategory getException() {
140 * Sets the value of the exception property.
142 * @param value allowed object is {@link MsoExceptionCategory }
145 public void setException(MsoExceptionCategory value) {
146 this.exception = value;
150 * Gets the value of the errorMessage property.
152 * @return possible object is {@link String }
155 public String getErrorMessage() {
160 * Sets the value of the errorMessage property.
162 * @param value allowed object is {@link String }
165 public void setErrorMessage(String value) {
166 this.errorMessage = value;
170 * Gets the value of the vnfId property.
172 * @return possible object is {@link String }
175 public String getVnfId() {
180 * Sets the value of the vnfId property.
182 * @param value allowed object is {@link String }
185 public void setVnfId(String value) {
190 * Gets the value of the outputs property.
192 * @return possible object is {@link CreateVnfNotification.Outputs }
195 public CreateVnfNotification.Outputs getOutputs() {
200 * Sets the value of the outputs property.
202 * @param value allowed object is {@link CreateVnfNotification.Outputs }
205 public void setOutputs(CreateVnfNotification.Outputs value) {
206 this.outputs = value;
210 * Gets the value of the rollback property.
212 * @return possible object is {@link VnfRollback }
215 public VnfRollback getRollback() {
220 * Sets the value of the rollback property.
222 * @param value allowed object is {@link VnfRollback }
225 public void setRollback(VnfRollback value) {
226 this.rollback = value;
232 * Java class for anonymous complex type.
235 * The following schema fragment specifies the expected content contained within this class.
239 * <complexContent>
240 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
242 * <element name="entry" maxOccurs="unbounded" minOccurs="0">
244 * <complexContent>
245 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
247 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
248 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
251 * </complexContent>
256 * </complexContent>
262 @XmlAccessorType(XmlAccessType.FIELD)
263 @XmlType(name = "", propOrder = {"entry"})
264 public static class Outputs {
266 protected List<CreateVnfNotification.Outputs.Entry> entry;
269 * Gets the value of the entry property.
272 * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you
273 * make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
274 * method for the entry property.
277 * For example, to add a new item, do as follows:
280 * getEntry().add(newItem);
285 * Objects of the following type(s) are allowed in the list {@link CreateVnfNotification.Outputs.Entry }
289 public List<CreateVnfNotification.Outputs.Entry> getEntry() {
291 entry = new ArrayList<>();
296 // Not a generated method
298 public String toString() {
299 StringBuilder out = new StringBuilder();
300 out.append("<outputs>\n");
302 for (Entry e : entry) {
303 out.append(e.toString());
307 out.append("</outputs>");
308 return out.toString();
313 * Java class for anonymous complex type.
316 * The following schema fragment specifies the expected content contained within this class.
320 * <complexContent>
321 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
323 * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
324 * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
327 * </complexContent>
333 @XmlAccessorType(XmlAccessType.FIELD)
334 @XmlType(name = "", propOrder = {"key", "value"})
335 public static class Entry {
337 protected String key;
338 protected String value;
341 * Gets the value of the key property.
343 * @return possible object is {@link String }
346 public String getKey() {
351 * Sets the value of the key property.
353 * @param value allowed object is {@link String }
356 public void setKey(String value) {
361 * Gets the value of the value property.
363 * @return possible object is {@link String }
366 public String getValue() {
371 * Sets the value of the value property.
373 * @param value allowed object is {@link String }
376 public void setValue(String value) {
381 // Not a generated method
383 public String toString() {
385 entrystr = "<entry>" + '\n' + " <key>" + key + "</key>" + '\n' + " <value>" + value + "</value>"
394 // Not a generated method
396 public String toString() {
397 String createVnfNotification;
398 if (exception == null) {
399 createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n'
400 + " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' + " <messageId>"
401 + messageId + "</messageId>" + '\n' + " <completed>" + completed + "</completed>" + '\n'
402 + " <vnfId>" + vnfId + "</vnfId>" + '\n' + (outputs == null ? "" : outputs.toString() + '\n')
403 + " <rollback>" + rollback + "</rollback>" + '\n' + "</ns2:createVnfNotification>";
405 createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n'
406 + " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' + " <messageId>"
407 + messageId + "</messageId>" + '\n' + " <completed>" + completed + "</completed>" + '\n'
408 + (outputs == null ? "" : outputs.toString() + '\n') + " <exception>" + exception + "</exception>"
409 + '\n' + " <errorMessage>" + errorMessage + "</errorMessage>" + '\n'
410 + "</ns2:createVnfNotification>";
412 return createVnfNotification;