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 ComputeFlavor {
 
  27   private String disk_size;
 
  28   private String mem_size;
 
  30   public int getNum_cpus() {
 
  34   public void setNum_cpus(int num_cpus) {
 
  35     this.num_cpus = num_cpus;
 
  38   public String getDisk_size() {
 
  42   public void setDisk_size(String disk_size) {
 
  43     this.disk_size = disk_size;
 
  46   public String getMem_size() {
 
  50   public void setMem_size(String mem_size) {
 
  51     this.mem_size = mem_size;
 
  55   public String toString() {
 
  56     return "ComputeFlavor{ num_cpus=" + num_cpus + ", disk_size= " + disk_size
 
  57         + ", mem_size=" + mem_size + "}";
 
  61   public boolean equals(Object obj) {
 
  64     if (obj != null && getClass() != obj.getClass())
 
  66     ComputeFlavor other = (ComputeFlavor) obj;
 
  68       if (num_cpus != other.num_cpus)
 
  70       if (this.disk_size == null) {
 
  71         if (other.disk_size != null)
 
  73       } else if (!disk_size.equals(other.disk_size))
 
  75       if (this.mem_size == null) {
 
  76         if (other.mem_size != null)
 
  78       } else if (!mem_size.equals(other.mem_size))
 
  85   public int hashCode() {
 
  86     int result = num_cpus;
 
  87     result = 31 * result + (disk_size != null ? disk_size.hashCode() : 0);
 
  88     result = 31 * result + (mem_size != null ? mem_size.hashCode() : 0);