025db1cafc82047f7abf31521cc4bdb3a32e6df5
[sdc.git] /
1 package org.openecomp.sdc.generator.datatypes.tosca;
2
3 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
4
5 import java.util.List;
6 import java.util.Map;
7
8 public class VspModelInfo {
9   private String releaseVendor;
10   //Map of component id and name
11   private Map<String, String> components;
12   //Map of part number and deployment flavor model
13   private Map<String, DeploymentFlavorModel> allowedFlavors;
14   //Map of component id and images
15   private Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages;
16   //Map of component and ports (NICs)
17   private Map<String, List<Nic>> nics;
18
19   public String getReleaseVendor() {
20     return releaseVendor;
21   }
22
23   public void setReleaseVendor(String releaseVendor) {
24     this.releaseVendor = releaseVendor;
25   }
26
27   public Map<String, String> getComponents() {
28     return components;
29   }
30
31   public void setComponents(Map<String, String> components) {
32     this.components = components;
33   }
34
35   public Map<String, DeploymentFlavorModel> getAllowedFlavors() {
36     return allowedFlavors;
37   }
38
39   public void setAllowedFlavors(Map<String, DeploymentFlavorModel> allowedFlavors) {
40     this.allowedFlavors = allowedFlavors;
41   }
42
43   public Map<String, List<MultiFlavorVfcImage>> getMultiFlavorVfcImages() {
44     return multiFlavorVfcImages;
45   }
46
47   public void setMultiFlavorVfcImages(Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages) {
48     this.multiFlavorVfcImages = multiFlavorVfcImages;
49   }
50
51   public Map<String, List<Nic>> getNics() {
52     return nics;
53   }
54
55   public void setNics(Map<String, List<Nic>> nics) {
56     this.nics = nics;
57   }
58
59   @Override
60   public int hashCode() {
61     int result = releaseVendor != null ? releaseVendor.hashCode() : 0;
62     result = 31 * result + (components != null ? components.hashCode() : 0);
63     result = 31 * result + (allowedFlavors != null ? allowedFlavors.hashCode() : 0);
64     result = 31 * result + (multiFlavorVfcImages != null ? multiFlavorVfcImages.hashCode() : 0);
65     result = 31 * result + (nics != null ? nics.hashCode() : 0);
66     return result;
67   }
68
69   @Override
70   public String toString() {
71     return "VspModelInfo{"
72        + "releaseVendor='" + releaseVendor + '\''
73        + ", components=" + components
74        + ", allowedFlavors=" + allowedFlavors
75        + ", multiFlavorVfcImages=" + multiFlavorVfcImages
76        + ", nics=" + nics
77        + '}';
78   }
79
80   @Override
81   public boolean equals(Object obj) {
82     if (this == obj) {
83       return true;
84     }
85     if (getClass() != obj.getClass()) {
86       return false;
87     }
88     VspModelInfo other = (VspModelInfo) obj;
89     if (this.releaseVendor == null) {
90       if (other.releaseVendor != null) {
91         return false;
92       }
93     } else if (!releaseVendor.equals(other.releaseVendor)) {
94       return false;
95     }
96     if (this.components == null) {
97       if (other.components != null) {
98         return false;
99       }
100     } else if (!components.equals(other.components)) {
101       return false;
102     }
103     if (this.allowedFlavors == null) {
104       if (other.allowedFlavors != null) {
105         return false;
106       }
107     } else if (!allowedFlavors.equals(other.allowedFlavors)) {
108       return false;
109     }
110     if (this.multiFlavorVfcImages == null) {
111       if (other.multiFlavorVfcImages != null) {
112         return false;
113       }
114     } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
115       return false;
116     }
117     if (this.multiFlavorVfcImages == null) {
118       if (other.multiFlavorVfcImages != null) {
119         return false;
120       }
121     } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
122       return false;
123     }
124     if (this.nics == null) {
125       if (other.nics != null) {
126         return false;
127       }
128     } else if (!nics.equals(other.nics)) {
129       return false;
130     }
131     return true;
132   }
133 }