Add dcae structure
[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     @Expose
57     private String selfLink;
58
59     public String getTypeName() {
60         return typeName;
61     }
62
63     public void setTypeName(String typeName) {
64         this.typeName = typeName;
65     }
66
67     public String getTypeId() {
68         return typeId;
69     }
70
71     public void setTypeId(String typeId) {
72         this.typeId = typeId;
73     }
74
75     public String getBlueprintTemplate() {
76         return blueprintTemplate;
77     }
78
79     public void setBlueprintTemplate(String blueprintTemplate) {
80         this.blueprintTemplate = blueprintTemplate;
81     }
82
83     public String getAsdcServiceId() {
84         return asdcServiceId;
85     }
86
87     public void setAsdcServiceId(String asdcServiceId) {
88         this.asdcServiceId = asdcServiceId;
89     }
90
91     public String getAsdcResourceId() {
92         return asdcResourceId;
93     }
94
95     public void setAsdcResourceId(String asdcResourceId) {
96         this.asdcResourceId = asdcResourceId;
97     }
98
99     public String getSelfLink() {
100         return selfLink;
101     }
102
103     public void setSelfLink(String selfLink) {
104         this.selfLink = selfLink;
105     }
106
107     @Override
108     public int compareTo(DcaeInventoryResponse otherResponse) {
109         int thisResourceId = Integer.parseInt(this.asdcResourceId);
110         int otherResourceId = Integer.parseInt(otherResponse.getAsdcResourceId());
111         return (thisResourceId < otherResourceId ? -1 : (thisResourceId > otherResourceId ? 1 : 0));
112     }
113 }