3 * ============LICENSE_START=======================================================
5 * ================================================================================
6 * Copyright (C) 2019 AT&T Intellectual Property. All rights
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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 * ===================================================================
25 package org.onap.clamp.clds.model.dcae;
27 import com.google.gson.annotations.Expose;
30 * This class maps the DCAE inventory answer to a nice pojo.
32 public class DcaeInventoryResponse implements Comparable<DcaeInventoryResponse> {
35 private String typeName;
38 private String typeId;
41 private String blueprintTemplate;
44 * This field will be used to know all blueprints associated a loop.
47 private String asdcServiceId;
50 * This field will be used to know to order of each blueprint microservice in a
54 private String asdcResourceId;
56 public String getTypeName() {
60 public void setTypeName(String typeName) {
61 this.typeName = typeName;
64 public String getTypeId() {
68 public void setTypeId(String typeId) {
72 public String getBlueprintTemplate() {
73 return blueprintTemplate;
76 public void setBlueprintTemplate(String blueprintTemplate) {
77 this.blueprintTemplate = blueprintTemplate;
80 public String getAsdcServiceId() {
84 public void setAsdcServiceId(String asdcServiceId) {
85 this.asdcServiceId = asdcServiceId;
88 public String getAsdcResourceId() {
89 return asdcResourceId;
92 public void setAsdcResourceId(String asdcResourceId) {
93 this.asdcResourceId = asdcResourceId;
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));