2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 * Modifications copyright (c) 2019 Nokia
20 * ================================================================================
23 package org.openecomp.sdc.generator.datatypes.tosca;
25 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
27 import java.util.List;
30 public class VspModelInfo {
31 private String releaseVendor;
32 //Map of component id and name
33 private Map<String, String> components;
34 //Map of part number and deployment flavor model
35 private Map<String, DeploymentFlavorModel> allowedFlavors;
36 //Map of component id and images
37 private Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages;
38 //Map of component and ports (NICs)
39 private Map<String, List<Nic>> nics;
41 public String getReleaseVendor() {
45 public void setReleaseVendor(String releaseVendor) {
46 this.releaseVendor = releaseVendor;
49 public Map<String, String> getComponents() {
53 public void setComponents(Map<String, String> components) {
54 this.components = components;
57 public Map<String, DeploymentFlavorModel> getAllowedFlavors() {
58 return allowedFlavors;
61 public void setAllowedFlavors(Map<String, DeploymentFlavorModel> allowedFlavors) {
62 this.allowedFlavors = allowedFlavors;
65 public Map<String, List<MultiFlavorVfcImage>> getMultiFlavorVfcImages() {
66 return multiFlavorVfcImages;
69 public void setMultiFlavorVfcImages(Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages) {
70 this.multiFlavorVfcImages = multiFlavorVfcImages;
73 public Map<String, List<Nic>> getNics() {
77 public void setNics(Map<String, List<Nic>> nics) {
82 public int hashCode() {
83 int result = releaseVendor != null ? releaseVendor.hashCode() : 0;
84 result = 31 * result + (components != null ? components.hashCode() : 0);
85 result = 31 * result + (allowedFlavors != null ? allowedFlavors.hashCode() : 0);
86 result = 31 * result + (multiFlavorVfcImages != null ? multiFlavorVfcImages.hashCode() : 0);
87 result = 31 * result + (nics != null ? nics.hashCode() : 0);
92 public String toString() {
93 return "VspModelInfo{"
94 + "releaseVendor='" + releaseVendor + '\''
95 + ", components=" + components
96 + ", allowedFlavors=" + allowedFlavors
97 + ", multiFlavorVfcImages=" + multiFlavorVfcImages
103 public boolean equals(Object obj) {
107 if (obj == null || getClass() != obj.getClass()) {
110 VspModelInfo other = (VspModelInfo) obj;
112 if (this.releaseVendor == null) {
113 if (other.releaseVendor != null) {
116 } else if (!releaseVendor.equals(other.releaseVendor)) {
119 if (this.components == null) {
120 if (other.components != null) {
123 } else if (!components.equals(other.components)) {
126 if (this.allowedFlavors == null) {
127 if (other.allowedFlavors != null) {
130 } else if (!allowedFlavors.equals(other.allowedFlavors)) {
133 if (this.multiFlavorVfcImages == null) {
134 if (other.multiFlavorVfcImages != null) {
137 } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
140 if (this.multiFlavorVfcImages == null) {
141 if (other.multiFlavorVfcImages != null) {
144 } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
147 if (this.nics == null) {
148 if (other.nics != null) {
151 } else if (!nics.equals(other.nics)) {