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 com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
23 import java.io.StringWriter;
25 import javax.xml.bind.JAXBContext;
26 import javax.xml.bind.JAXBException;
27 import javax.xml.bind.Marshaller;
28 import javax.xml.bind.annotation.XmlAccessType;
29 import javax.xml.bind.annotation.XmlAccessorType;
30 import javax.xml.bind.annotation.XmlElement;
31 import javax.xml.bind.annotation.XmlType;
33 import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
37 * <p>Java class for deleteVnfNotification complex type.
39 * <p>The following schema fragment specifies the expected content contained within this class.
42 * <complexType name="deleteVnfNotification">
44 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
46 * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
47 * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
48 * <element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
49 * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
52 * </complexContent>
58 @XmlAccessorType(XmlAccessType.FIELD)
59 @XmlType(name = "deleteVnfNotification1", propOrder = {
65 public class DeleteVnfNotification {
67 @XmlElement(required = true)
68 protected String messageId;
69 protected boolean completed;
70 protected MsoExceptionCategory exception;
71 protected String errorMessage;
74 * Gets the value of the messageId property.
81 public String getMessageId() {
86 * Sets the value of the messageId property.
93 public void setMessageId(String value) {
94 this.messageId = value;
98 * Gets the value of the completed property.
101 public boolean isCompleted() {
106 * Sets the value of the completed property.
109 public void setCompleted(boolean value) {
110 this.completed = value;
114 * Gets the value of the exception property.
118 * {@link MsoExceptionCategory }
121 public MsoExceptionCategory getException() {
126 * Sets the value of the exception property.
130 * {@link MsoExceptionCategory }
133 public void setException(MsoExceptionCategory value) {
134 this.exception = value;
138 * Gets the value of the errorMessage property.
145 public String getErrorMessage() {
150 * Sets the value of the errorMessage property.
157 public void setErrorMessage(String value) {
158 this.errorMessage = value;
162 * Overrides toString() method
163 * @return String type (deleteVnfNotification)
167 public String toString() {
168 String deleteVnfNotification = "";
169 if (exception==null) {
170 deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
171 " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
172 " <messageId>"+messageId+"</messageId>" + '\n' +
173 " <completed>"+completed+"</completed>" + '\n' +
174 "</ns2:deleteVnfNotification>";
176 deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
177 " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
178 " <messageId>"+messageId+"</messageId>" + '\n' +
179 " <completed>"+completed+"</completed>" + '\n' +
180 " <exception>"+exception+"</exception>" + '\n' +
181 " <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
182 "</ns2:deleteVnfNotification>";
184 return deleteVnfNotification;
188 public String toString() {
189 StringWriter writer = new StringWriter();
191 JAXBContext context = JAXBContext
192 .newInstance(DeleteVnfNotification.class);
193 Marshaller m = context.createMarshaller();
194 m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
195 m.marshal(this, writer);
196 //System.out.println("toString() - " + writer.getBuffer().toString());
197 return writer.getBuffer().toString();
198 } catch (JAXBException e) {
199 //System.out.println("JAXBException - " + e.getStackTrace());