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