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