1 /*******************************************************************************
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==========================================================================
17 ******************************************************************************/
18 package org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes;
20 import java.util.ArrayList;
21 import java.util.List;
23 public class InventoryInformation {
25 private static final String UNKNOWN = "unknown";
26 private static final List<String> EMPTY = new ArrayList<>();
27 private static final InventoryInformation DEFAULT = new InventoryInformation();
31 private String vendor;
32 private String deviceIpv4;
33 private String deviceIpv6;
34 private List<String> interfaceUuidList;
36 public InventoryInformation()
41 this.deviceIpv4=UNKNOWN;
42 this.deviceIpv6=UNKNOWN;
43 this.interfaceUuidList=EMPTY;
46 public InventoryInformation(InventoryInformation inventoryInformation) {
47 this.type=inventoryInformation.type;
48 this.model=inventoryInformation.model;
49 this.vendor=inventoryInformation.vendor;
50 this.deviceIpv4=inventoryInformation.deviceIpv4;
51 this.deviceIpv6=inventoryInformation.deviceIpv6;
52 this.interfaceUuidList=new ArrayList<>(inventoryInformation.interfaceUuidList);
55 public InventoryInformation(
56 String type, String model, String vendor, String deviceIpv4,
57 String deviceIpv6, List<String> interfaceUuidList) {
61 setDeviceIpv4(deviceIpv4);
62 setDeviceIpv6(deviceIpv6);
63 setInterfaceUuidList(interfaceUuidList);
66 public String getType() {
70 public String getModel() {
74 public String getVendor() {
78 public String getDeviceIpv4() {
82 public String getDeviceIpv6() {
86 public List<String> getInterfaceUuidList() {
87 return interfaceUuidList;
90 public InventoryInformation setType(String type) {
91 this.type = type != null ? type : UNKNOWN;
95 public InventoryInformation setModel(String model) {
96 this.model = model != null ? model : UNKNOWN;
100 public InventoryInformation setVendor(String vendor) {
101 this.vendor = vendor != null ? vendor : UNKNOWN;
105 public InventoryInformation setDeviceIpv4(String deviceIpv4) {
106 this.deviceIpv4 = deviceIpv4 != null ? deviceIpv4 : UNKNOWN;
110 public InventoryInformation setDeviceIpv6(String deviceIpv6) {
111 this.deviceIpv6 = deviceIpv6 != null ? deviceIpv6 : UNKNOWN ;
115 public InventoryInformation setInterfaceUuidList(List<String> interfaceUuidList) {
116 this.interfaceUuidList = interfaceUuidList != null ? interfaceUuidList : EMPTY;
120 public static InventoryInformation getDefault() {
125 public String toString() {
126 return "InventoryInformation [type=" + type + ", model=" + model + ", vendor=" + vendor + ", deviceIpv4="
127 + deviceIpv4 + ", deviceIpv6=" + deviceIpv6 + ", interfaceUuidList=" + interfaceUuidList + "]";