Change the header to SO
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / openecomp / mso / adapters / sdncrest / SDNCServiceRequest.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 package org.openecomp.mso.adapters.sdncrest;
21
22 import org.codehaus.jackson.annotate.JsonProperty;
23 import org.codehaus.jackson.map.annotate.JsonRootName;
24 import org.codehaus.jackson.map.annotate.JsonSerialize;
25 import org.jboss.resteasy.annotations.providers.NoJackson;
26
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlRootElement;
29 import java.io.Serializable;
30
31 // NOTE: the JAXB (XML) annotations are required with JBoss AS7 and RESTEasy,
32 //       even though we are using JSON exclusively.  The @NoJackson annotation
33 //       is also required in this environment.
34
35 /**
36  * SDNC adapter request for "agnostic" API services.
37  * The target action is determined by a service type and an operation.
38  */
39 @JsonRootName("SDNCServiceRequest")
40 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
41 @XmlRootElement(name = "SDNCServiceRequest")
42 @NoJackson
43 public class SDNCServiceRequest extends SDNCRequestCommon implements Serializable {
44         private static final long serialVersionUID = 1L;
45
46         // Request Information specified by SDNC "agnostic" API
47         private RequestInformation requestInformation;
48
49         // Service Information specified by: SDNC "agnostic" API
50         private ServiceInformation serviceInformation;
51
52         // The SDNC service type specified by SDNC "agnostic" API
53         private String sdncService;
54
55         // The SDNC operation specified by SDNC "agnostic" API
56         private String sdncOperation;
57
58         // The SDNC service data type specified by SDNC "agnostic" API
59         private String sdncServiceDataType;
60
61         // The SDNC service data specified by SDNC "agnostic" API
62     private String sndcServiceData;
63
64         public SDNCServiceRequest() {
65         }
66
67         public SDNCServiceRequest(String bpNotificationUrl, String bpTimeout,
68                         String sdncRequestId, String sdncService, String sdncOperation,
69                         RequestInformation requestInformation,
70                         ServiceInformation serviceInformation, String sdncServiceDataType,
71                         String sndcServiceData) {
72                 super(bpNotificationUrl, bpTimeout, sdncRequestId);
73                 this.requestInformation = requestInformation;
74                 this.serviceInformation = serviceInformation;
75                 this.sdncService = sdncService;
76                 this.sdncOperation = sdncOperation;
77                 this.sdncServiceDataType = sdncServiceDataType;
78                 this.sndcServiceData = sndcServiceData;
79         }
80
81         @JsonProperty("requestInformation")
82         @XmlElement(name = "requestInformation")
83         public RequestInformation getRequestInformation() {
84                 return requestInformation;
85         }
86
87         @JsonProperty("requestInformation")
88         public void setRequestInformation(RequestInformation requestInformation) {
89                 this.requestInformation = requestInformation;
90         }
91
92         @JsonProperty("serviceInformation")
93         @XmlElement(name = "serviceInformation")
94         public ServiceInformation getServiceInformation() {
95                 return serviceInformation;
96         }
97
98         @JsonProperty("serviceInformation")
99         public void setServiceInformation(ServiceInformation serviceInformation) {
100                 this.serviceInformation = serviceInformation;
101         }
102
103         @JsonProperty("sdncService")
104         @XmlElement(name = "sdncService")
105         public String getSDNCService() {
106                 return sdncService;
107         }
108
109         @JsonProperty("sdncService")
110         public void setSDNCService(String sdncService) {
111                 this.sdncService = sdncService;
112         }
113
114         @JsonProperty("sdncOperation")
115         @XmlElement(name = "sdncOperation")
116         public String getSDNCOperation() {
117                 return sdncOperation;
118         }
119
120         @JsonProperty("sdncOperation")
121         public void setSDNCOperation(String sdncOperation) {
122                 this.sdncOperation = sdncOperation;
123         }
124
125         @JsonProperty("sdncServiceDataType")
126         @XmlElement(name = "sdncServiceDataType")
127         public String getSDNCServiceDataType() {
128                 return sdncServiceDataType;
129         }
130
131         @JsonProperty("sdncServiceDataType")
132         public void setSDNCServiceDataType(String sdncServiceDataType) {
133                 this.sdncServiceDataType = sdncServiceDataType;
134         }
135
136         @JsonProperty("sdncServiceData")
137         @XmlElement(name = "sdncServiceData")
138         public String getSDNCServiceData() {
139                 return sndcServiceData;
140         }
141
142         @JsonProperty("sdncServiceData")
143         public void setSDNCServiceData(String sndcServiceData) {
144                 this.sndcServiceData = sndcServiceData;
145         }
146 }