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