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 @SuppressWarnings("CheckStyle")
 
  24 public class DeploymentFlavorModel {
 
  26   private String sp_part_number;
 
  27   private VendorInfo vendor_info;
 
  28   private ComputeFlavor compute_flavor;
 
  29   private LicenseFlavor license_flavor;
 
  31   public String getSp_part_number() {
 
  32     return sp_part_number;
 
  35   public void setSp_part_number(String sp_part_number) {
 
  36     this.sp_part_number = sp_part_number;
 
  39   public VendorInfo getVendor_info() {
 
  43   public void setVendor_info(VendorInfo vendor_info) {
 
  44     this.vendor_info = vendor_info;
 
  47   public ComputeFlavor getCompute_flavor() {
 
  48     return compute_flavor;
 
  51   public void setCompute_flavor(ComputeFlavor compute_flavor) {
 
  52     this.compute_flavor = compute_flavor;
 
  55   public LicenseFlavor getLicense_flavor() {
 
  56     return license_flavor;
 
  59   public void setLicense_flavor(LicenseFlavor license_flavor) {
 
  60     this.license_flavor = license_flavor;
 
  64   public String toString() {
 
  65     return "DeploymentFlavorModel{" + "sp_part_number='" + sp_part_number + '\''
 
  66         + ", vendor_info=" + vendor_info
 
  67         + ", compute_flavor=" + compute_flavor
 
  68         + ", license_flavor=" + license_flavor
 
  73   public boolean equals(Object obj) {
 
  76     if (obj != null && getClass() != obj.getClass())
 
  78     DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
 
  80       if (this.sp_part_number == null) {
 
  81         if (other.sp_part_number != null)
 
  83       } else if (!sp_part_number.equals(other.sp_part_number))
 
  85       if (this.vendor_info == null) {
 
  86         if (other.vendor_info != null)
 
  88       } else if (!vendor_info.equals(other.vendor_info))
 
  90       if (this.compute_flavor == null) {
 
  91         if (other.compute_flavor != null)
 
  93       } else if (!compute_flavor.equals(other.compute_flavor))
 
  95       if (this.license_flavor == null) {
 
  96         if (other.license_flavor != null)
 
  98       } else if (!license_flavor.equals(other.license_flavor))
 
 105   public int hashCode() {
 
 106     int result = sp_part_number != null ? sp_part_number.hashCode() : 0;
 
 107     result = 31 * result + (vendor_info != null ? vendor_info.hashCode() : 0);
 
 108     result = 31 * result + (compute_flavor != null ? compute_flavor.hashCode() : 0);
 
 109     result = 31 * result + (license_flavor != null ? license_flavor.hashCode() : 0);