Create a camel route that would retrieve all the DCAE blueprints
[clamp.git] / src / main / java / org / onap / clamp / clds / model / dcae / DcaeInventoryResponse.java
1
2 /*-
3  * ============LICENSE_START=======================================================
4  * ONAP CLAMP
5  * ================================================================================
6  * Copyright (C) 2019 AT&T Intellectual Property. All rights
7  *                             reserved.
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END============================================
21  * ===================================================================
22  *
23  */
24
25 package org.onap.clamp.clds.model.dcae;
26
27 import com.google.gson.annotations.Expose;
28
29 /**
30  * This class maps the DCAE inventory answer to a nice pojo.
31  */
32 public class DcaeInventoryResponse implements Comparable<DcaeInventoryResponse> {
33
34     @Expose
35     private String typeName;
36
37     @Expose
38     private String typeId;
39
40     @Expose
41     private String blueprintTemplate;
42
43     /**
44      * This field will be used to know all blueprints associated a loop.
45      */
46     @Expose
47     private String asdcServiceId;
48
49     /**
50      * This field will be used to know to order of each blueprint microservice in a
51      * loop.
52      */
53     @Expose
54     private String asdcResourceId;
55
56     public String getTypeName() {
57         return typeName;
58     }
59
60     public void setTypeName(String typeName) {
61         this.typeName = typeName;
62     }
63
64     public String getTypeId() {
65         return typeId;
66     }
67
68     public void setTypeId(String typeId) {
69         this.typeId = typeId;
70     }
71
72     public String getBlueprintTemplate() {
73         return blueprintTemplate;
74     }
75
76     public void setBlueprintTemplate(String blueprintTemplate) {
77         this.blueprintTemplate = blueprintTemplate;
78     }
79
80     public String getAsdcServiceId() {
81         return asdcServiceId;
82     }
83
84     public void setAsdcServiceId(String asdcServiceId) {
85         this.asdcServiceId = asdcServiceId;
86     }
87
88     public String getAsdcResourceId() {
89         return asdcResourceId;
90     }
91
92     public void setAsdcResourceId(String asdcResourceId) {
93         this.asdcResourceId = asdcResourceId;
94     }
95
96     @Override
97     public int compareTo(DcaeInventoryResponse otherResponse) {
98         int thisResourceId = Integer.parseInt(this.asdcResourceId);
99         int otherResourceId = Integer.parseInt(otherResponse.getAsdcResourceId());
100         return (thisResourceId < otherResourceId ? -1 : (thisResourceId > otherResourceId ? 1 : 0));
101     }
102 }