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=========================================================
 
  21 package org.openecomp.sdc.generator.datatypes.tosca;
 
  23 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
 
  25 import java.util.List;
 
  28 public class VspModelInfo {
 
  29   private String releaseVendor;
 
  30   //Map of component id and name
 
  31   private Map<String, String> components;
 
  32   //Map of part number and deployment flavor model
 
  33   private Map<String, DeploymentFlavorModel> allowedFlavors;
 
  34   //Map of component id and images
 
  35   private Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages;
 
  36   //Map of component and ports (NICs)
 
  37   private Map<String, List<Nic>> nics;
 
  39   public String getReleaseVendor() {
 
  43   public void setReleaseVendor(String releaseVendor) {
 
  44     this.releaseVendor = releaseVendor;
 
  47   public Map<String, String> getComponents() {
 
  51   public void setComponents(Map<String, String> components) {
 
  52     this.components = components;
 
  55   public Map<String, DeploymentFlavorModel> getAllowedFlavors() {
 
  56     return allowedFlavors;
 
  59   public void setAllowedFlavors(Map<String, DeploymentFlavorModel> allowedFlavors) {
 
  60     this.allowedFlavors = allowedFlavors;
 
  63   public Map<String, List<MultiFlavorVfcImage>> getMultiFlavorVfcImages() {
 
  64     return multiFlavorVfcImages;
 
  67   public void setMultiFlavorVfcImages(Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages) {
 
  68     this.multiFlavorVfcImages = multiFlavorVfcImages;
 
  71   public Map<String, List<Nic>> getNics() {
 
  75   public void setNics(Map<String, List<Nic>> nics) {
 
  80   public int hashCode() {
 
  81     int result = releaseVendor != null ? releaseVendor.hashCode() : 0;
 
  82     result = 31 * result + (components != null ? components.hashCode() : 0);
 
  83     result = 31 * result + (allowedFlavors != null ? allowedFlavors.hashCode() : 0);
 
  84     result = 31 * result + (multiFlavorVfcImages != null ? multiFlavorVfcImages.hashCode() : 0);
 
  85     result = 31 * result + (nics != null ? nics.hashCode() : 0);
 
  90   public String toString() {
 
  91     return "VspModelInfo{"
 
  92        + "releaseVendor='" + releaseVendor + '\''
 
  93        + ", components=" + components
 
  94        + ", allowedFlavors=" + allowedFlavors
 
  95        + ", multiFlavorVfcImages=" + multiFlavorVfcImages
 
 101   public boolean equals(Object obj) {
 
 105     if (obj != null && getClass() != obj.getClass()) {
 
 108     VspModelInfo other = (VspModelInfo) obj;
 
 110       if (this.releaseVendor == null) {
 
 111         if (other.releaseVendor != null) {
 
 114       } else if (!releaseVendor.equals(other.releaseVendor)) {
 
 117       if (this.components == null) {
 
 118         if (other.components != null) {
 
 121       } else if (!components.equals(other.components)) {
 
 124       if (this.allowedFlavors == null) {
 
 125         if (other.allowedFlavors != null) {
 
 128       } else if (!allowedFlavors.equals(other.allowedFlavors)) {
 
 131       if (this.multiFlavorVfcImages == null) {
 
 132         if (other.multiFlavorVfcImages != null) {
 
 135       } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
 
 138       if (this.multiFlavorVfcImages == null) {
 
 139         if (other.multiFlavorVfcImages != null) {
 
 142       } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
 
 145       if (this.nics == null) {
 
 146         if (other.nics != null) {
 
 149       } else if (!nics.equals(other.nics)) {