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 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;
30 * <p>Java class for deleteVnfNotification complex type.
32 * <p>The following schema fragment specifies the expected content contained within this class.
35 * <complexType name="deleteVnfNotification">
37 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
39 * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
40 * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
41 * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
42 * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
45 * </complexContent>
51 @XmlAccessorType(XmlAccessType.FIELD)
52 @XmlType(name = "deleteVnfNotification1", propOrder = {
58 public class DeleteVnfNotification {
60 @XmlElement(required = true)
61 protected String messageId;
62 protected boolean completed;
63 protected MsoExceptionCategory exception;
64 protected String errorMessage;
67 * Gets the value of the messageId property.
74 public String getMessageId() {
79 * Sets the value of the messageId property.
86 public void setMessageId(String value) {
87 this.messageId = value;
91 * Gets the value of the completed property.
94 public boolean isCompleted() {
99 * Sets the value of the completed property.
102 public void setCompleted(boolean value) {
103 this.completed = value;
107 * Gets the value of the exception property.
111 * {@link MsoExceptionCategory }
114 public MsoExceptionCategory getException() {
119 * Sets the value of the exception property.
123 * {@link MsoExceptionCategory }
126 public void setException(MsoExceptionCategory value) {
127 this.exception = value;
131 * Gets the value of the errorMessage property.
138 public String getErrorMessage() {
143 * Sets the value of the errorMessage property.
150 public void setErrorMessage(String value) {
151 this.errorMessage = value;
155 * Overrides toString() method
156 * @return String type (deleteVnfNotification)
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>";
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>";
177 return deleteVnfNotification;
181 public String toString() {
182 StringWriter writer = new StringWriter();
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());