2 * ============LICENSE_START========================================================================
3 * ONAP : ccsdk feature sdnr wt
4 * =================================================================================================
5 * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6 * =================================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software distributed under the License
13 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14 * or implied. See the License for the specific language governing permissions and limitations under
16 * ============LICENSE_END==========================================================================
18 package org.onap.ccsdk.features.sdnr.wt.devicemanager.types;
20 import java.util.ArrayList;
21 import java.util.List;
24 * Inventory information of a device, used by DCAE
26 public class InventoryInformationDcae {
28 private static final String UNKNOWN = "unknown";
29 private static final List<String> EMPTY = new ArrayList<>();
30 private static final InventoryInformationDcae DEFAULT = new InventoryInformationDcae();
34 private String vendor;
35 private String deviceIpv4;
36 private String deviceIpv6;
37 private List<String> interfaceUuidList;
39 public InventoryInformationDcae()
44 this.deviceIpv4=UNKNOWN;
45 this.deviceIpv6=UNKNOWN;
46 this.interfaceUuidList=EMPTY;
49 public InventoryInformationDcae(InventoryInformationDcae inventoryInformation) {
50 this.type=inventoryInformation.type;
51 this.model=inventoryInformation.model;
52 this.vendor=inventoryInformation.vendor;
53 this.deviceIpv4=inventoryInformation.deviceIpv4;
54 this.deviceIpv6=inventoryInformation.deviceIpv6;
55 this.interfaceUuidList=new ArrayList<>(inventoryInformation.interfaceUuidList);
58 public InventoryInformationDcae(
59 String type, String model, String vendor, String deviceIpv4,
60 String deviceIpv6, List<String> interfaceUuidList) {
64 setDeviceIpv4(deviceIpv4);
65 setDeviceIpv6(deviceIpv6);
66 setInterfaceUuidList(interfaceUuidList);
69 public String getType() {
73 public String getModel() {
77 public String getVendor() {
81 public String getDeviceIpv4() {
85 public String getDeviceIpv6() {
89 public List<String> getInterfaceUuidList() {
90 return interfaceUuidList;
93 public InventoryInformationDcae setType(String type) {
94 this.type = type != null ? type : UNKNOWN;
98 public InventoryInformationDcae setModel(String model) {
99 this.model = model != null ? model : UNKNOWN;
103 public InventoryInformationDcae setVendor(String vendor) {
104 this.vendor = vendor != null ? vendor : UNKNOWN;
108 public InventoryInformationDcae setDeviceIpv4(String deviceIpv4) {
109 this.deviceIpv4 = deviceIpv4 != null ? deviceIpv4 : UNKNOWN;
113 public InventoryInformationDcae setDeviceIpv6(String deviceIpv6) {
114 this.deviceIpv6 = deviceIpv6 != null ? deviceIpv6 : UNKNOWN ;
118 public InventoryInformationDcae setInterfaceUuidList(List<String> interfaceUuidList) {
119 this.interfaceUuidList = interfaceUuidList != null ? interfaceUuidList : EMPTY;
123 public static InventoryInformationDcae getDefault() {
128 public String toString() {
129 return "InventoryInformation [type=" + type + ", model=" + model + ", vendor=" + vendor + ", deviceIpv4="
130 + deviceIpv4 + ", deviceIpv6=" + deviceIpv6 + ", interfaceUuidList=" + interfaceUuidList + "]";