Updating aai adapter to v16 model
[ccsdk/sli/adaptors.git] / aai-service / provider / src / main / java / org / onap / ccsdk / sli / adaptors / aai / query / Result.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * openECOMP : SDN-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                         reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.ccsdk.sli.adaptors.aai.query;
23
24 import java.util.HashMap;
25 import java.util.Map;
26
27 import javax.xml.bind.annotation.XmlAccessType;
28 import javax.xml.bind.annotation.XmlAccessorType;
29 import javax.xml.bind.annotation.XmlElement;
30 import javax.xml.bind.annotation.XmlRootElement;
31 import javax.xml.bind.annotation.XmlType;
32
33 import org.onap.aai.inventory.v16.CloudRegion;
34 import org.onap.aai.inventory.v16.Complex;
35 import org.onap.aai.inventory.v16.Configuration;
36 import org.onap.aai.inventory.v16.GenericVnf;
37 import org.onap.aai.inventory.v16.L3InterfaceIpv4AddressList;
38 import org.onap.aai.inventory.v16.L3InterfaceIpv6AddressList;
39 import org.onap.aai.inventory.v16.L3Network;
40 import org.onap.aai.inventory.v16.LInterface;
41 //import org.onap.aai.inventory.v16.OwningEntity;
42 import org.onap.aai.inventory.v16.Pserver;
43 import org.onap.aai.inventory.v16.ServiceInstance;
44 import org.onap.aai.inventory.v16.Vnfc;
45 import org.onap.aai.inventory.v16.Vserver;
46
47 import com.fasterxml.jackson.annotation.JsonAnyGetter;
48 import com.fasterxml.jackson.annotation.JsonAnySetter;
49 import com.fasterxml.jackson.annotation.JsonIgnore;
50 import com.fasterxml.jackson.annotation.JsonProperty;
51
52 @XmlAccessorType(XmlAccessType.FIELD)
53 @XmlType(name = "", propOrder = {
54     "resource-type",
55     "resource-link",
56     "url",
57     "cloud-region",
58     "complex",
59     "configuration",
60     "generic-vnf",
61     "l3-interface-ipv4-address-list",
62     "l3-interface-ipv6-address-list",
63     "l3-network",
64     "l-interface",
65     "owning-entity",
66     "pserver",
67     "service-instance",
68     "vnfc",
69     "vserver"
70 })
71 @XmlRootElement(name = "result")
72 public class Result {
73
74     @XmlElement(name = "resource-type")
75     private String resourceType;
76     @XmlElement(name = "resource-link")
77     private String resourceLink;
78     @XmlElement(name = "url")
79     private String url;
80     @XmlElement(name = "cloud-region")
81     private CloudRegion cloudRegion;
82     @XmlElement(name = "complex")
83     private Complex complex;
84     @XmlElement(name = "configuration")
85     private Configuration configuration;
86     @XmlElement(name = "generic-vnf")
87     private GenericVnf genericVnf;
88     @XmlElement(name = "l3-interface-ipv4-address-list")
89     private L3InterfaceIpv4AddressList l3InterfaceIpv4AddressList;
90     @XmlElement(name = "l3-interface-ipv6-address-list")
91     private L3InterfaceIpv6AddressList l3InterfaceIpv6AddressList;
92     @XmlElement(name = "l3-network")
93     private L3Network l3Network;
94     @XmlElement(name = "l-interface")
95     private LInterface lInterface;
96 //    @XmlElement(name = "owning-entity")
97 //    private OwningEntity owningEntity;
98     @XmlElement(name = "pserver")
99     private Pserver pserver;
100     @XmlElement(name = "service-instance")
101     private ServiceInstance serviceInstance;
102     @XmlElement(name = "vnfc")
103     private Vnfc vnfc;
104     @XmlElement(name = "vserver")
105     private Vserver vserver;
106     @JsonIgnore
107     private Map<String, Object> additionalProperties = new HashMap<String, Object>();
108
109     @XmlElement(name = "cloud-region")
110     public CloudRegion getCloudRegion() {
111         return cloudRegion;
112     }
113
114     @XmlElement(name = "cloud-region")
115     public void setCloudRegion(CloudRegion cloudRegion) {
116         this.cloudRegion = cloudRegion;
117     }
118
119     @XmlElement(name = "complex")
120     public Complex getComplex() {
121         return complex;
122     }
123
124     @XmlElement(name = "complex")
125     public void setComplex(Complex complex) {
126         this.complex = complex;
127     }
128
129     @XmlElement(name = "configuration")
130     public Configuration getConfiguration() {
131         return configuration;
132     }
133
134     @XmlElement(name = "configuration")
135     public void setConfiguration(Configuration configuration) {
136         this.configuration = configuration;
137     }
138
139     @XmlElement(name = "generic-vnf")
140     public GenericVnf getGenericVnf ()
141     {
142         return genericVnf;
143     }
144
145     @XmlElement(name = "generic-vnf")
146     public void setGenericVnf (GenericVnf genericVnf)
147     {
148         this.genericVnf = genericVnf;
149     }
150
151     @JsonProperty("l3-interface-ipv4-address-list")
152     public L3InterfaceIpv4AddressList getL3InterfaceIpv4AddressList() {
153         return l3InterfaceIpv4AddressList;
154     }
155
156     @JsonProperty("l3-interface-ipv4-address-list")
157     public void setL3InterfaceIpv4AddressList(L3InterfaceIpv4AddressList l3InterfaceIpv4AddressList) {
158         this.l3InterfaceIpv4AddressList = l3InterfaceIpv4AddressList;
159     }
160
161     @JsonProperty("l3-interface-ipv6-address-list")
162     public L3InterfaceIpv6AddressList getL3InterfaceIpv6AddressList() {
163         return l3InterfaceIpv6AddressList;
164     }
165
166     @JsonProperty("l3-interface-ipv6-address-list")
167     public void setL3InterfaceIpv6AddressList(L3InterfaceIpv6AddressList l3InterfaceIpv6AddressList) {
168         this.l3InterfaceIpv6AddressList = l3InterfaceIpv6AddressList;
169     }
170
171     @XmlElement(name = "l3-network")
172     public L3Network getL3Network() {
173         return l3Network;
174     }
175
176     @XmlElement(name = "l3-network")
177     public void setL3Network(L3Network l3Network) {
178         this.l3Network = l3Network;
179     }
180
181     @XmlElement(name = "l-interface")
182     public LInterface getLInterface() {
183         return lInterface;
184     }
185     @XmlElement(name = "l-interface")
186     public void setLInterface(LInterface linterface) {
187         this.lInterface = linterface;
188     }
189
190 //    @XmlElement(name = "owning-entity")
191 //    public OwningEntity getOwningEntity() {
192 //        return owningEntity;
193 //    }
194
195 //    @XmlElement(name = "owning-entity")
196 //    public void setOwningEntity(OwningEntity owningEntity) {
197 //        this.owningEntity = owningEntity;
198 //    }
199
200     @XmlElement(name = "pserver")
201     public Pserver getPserver() {
202         return pserver;
203     }
204     @XmlElement(name = "pserver")
205     public void setPserver(Pserver pserver) {
206         this.pserver = pserver;
207     }
208
209     @XmlElement(name = "service-instance")
210     public ServiceInstance getServiceInstance() {
211         return serviceInstance;
212     }
213
214     @XmlElement(name = "service-instance")
215     public void setServiceInstance(ServiceInstance serviceInstance) {
216         this.serviceInstance = serviceInstance;
217     }
218
219     @XmlElement(name = "vnfc")
220     public Vnfc getVnfc() {
221         return vnfc;
222     }
223
224     @XmlElement(name = "vnfc")
225     public void setVnfc(Vnfc vnfc) {
226         this.vnfc = vnfc;
227     }
228
229     @XmlElement(name = "vserver")
230     public Vserver getVserver() {
231         return vserver;
232     }
233
234     @XmlElement(name = "vserver")
235     public void setVserver(Vserver vserver) {
236         this.vserver = vserver;
237     }
238
239     @Override
240     public String toString()
241     {
242         return " [generic-vnf = "+genericVnf+"]";
243     }
244
245     @JsonAnyGetter
246     public Map<String, Object> getAdditionalProperties() {
247         return this.additionalProperties;
248     }
249
250     @JsonAnySetter
251     public void setAdditionalProperty(String name, Object value) {
252         this.additionalProperties.put(name, value);
253     }
254     @XmlElement(name = "resource-type")
255     public String getResourceType() {
256         return resourceType;
257     }
258     @XmlElement(name = "resource-type")
259     public void setResourceType(String resourceType) {
260         this.resourceType = resourceType;
261     }
262     @XmlElement(name = "resource-link")
263     public String getResourceLink() {
264         return resourceLink;
265     }
266     @XmlElement(name = "resource-link")
267     public void setResourceLink(String resourceLink) {
268         this.resourceLink = resourceLink;
269     }
270     @XmlElement(name = "url")
271     public String getUrl() {
272         return url;
273     }
274     @XmlElement(name = "url")
275     public void setUrl(String url) {
276         this.url = url;
277     }
278 }