2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2020 Ericsson. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
20 package org.onap.so.etsi.nfvo.ns.lcm.bpmn.flows.nsd;
22 import static org.onap.so.etsi.nfvo.ns.lcm.database.beans.utils.Utils.toIndentedString;
23 import java.io.Serializable;
24 import java.util.HashMap;
25 import java.util.List;
27 import java.util.Objects;
30 * @author Waqas Ikram (waqas.ikram@est.tech)
33 public class VirtualNetworkFunction implements Serializable {
35 private static final long serialVersionUID = 3164293220359211834L;
37 private String vnfdId;
38 private String vnfName;
39 private List<String> vnfmInfoList;
40 private Map<String, Object> properties = new HashMap<>();
42 public String getVnfdId() {
46 public void setVnfdId(final String vnfdId) {
50 public VirtualNetworkFunction vnfdId(final String vnfdId) {
55 public String getVnfName() {
59 public void setVnfName(final String vnfName) {
60 this.vnfName = vnfName;
63 public VirtualNetworkFunction vnfName(final String vnfName) {
64 this.vnfName = vnfName;
68 public List<String> getVnfmInfoList() {
72 public void setVnfmInfoList(final List<String> vnfmInfoList) {
73 this.vnfmInfoList = vnfmInfoList;
76 public VirtualNetworkFunction vnfmInfoList(final List<String> vnfmInfoList) {
77 this.vnfmInfoList = vnfmInfoList;
81 public Map<String, Object> getProperties() {
85 public void setProperties(final Map<String, Object> properties) {
86 this.properties = properties;
89 public VirtualNetworkFunction properties(final Map<String, Object> properties) {
90 this.properties = properties;
95 public int hashCode() {
96 return Objects.hash(vnfdId, vnfName, vnfmInfoList, properties);
100 public boolean equals(final Object obj) {
101 if (obj instanceof VirtualNetworkFunction) {
102 final VirtualNetworkFunction other = (VirtualNetworkFunction) obj;
103 return Objects.equals(vnfdId, other.vnfdId) && Objects.equals(vnfName, other.vnfName)
104 && Objects.equals(vnfmInfoList, other.vnfmInfoList) && Objects.equals(properties, other.properties);
110 public String toString() {
111 final StringBuilder sb = new StringBuilder();
112 sb.append("class VirtualNetworkFunction {\n");
113 sb.append(" vnfdId: ").append(toIndentedString(vnfdId)).append("\n");
114 sb.append(" vnfName: ").append(toIndentedString(vnfName)).append("\n");
115 sb.append(" vnfmInfo: ").append(toIndentedString(vnfmInfoList)).append("\n");
116 sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
119 return sb.toString();