1 package org.openecomp.sdc.generator.datatypes.tosca;
3 @SuppressWarnings("CheckStyle")
4 public class ComputeFlavor {
7 private String disk_size;
8 private String mem_size;
10 public int getNum_cpus() {
14 public void setNum_cpus(int num_cpus) {
15 this.num_cpus = num_cpus;
18 public String getDisk_size() {
22 public void setDisk_size(String disk_size) {
23 this.disk_size = disk_size;
26 public String getMem_size() {
30 public void setMem_size(String mem_size) {
31 this.mem_size = mem_size;
35 public String toString() {
36 return "ComputeFlavor{ num_cpus=" + num_cpus + ", disk_size= " + disk_size
37 + ", mem_size=" + mem_size + "}";
41 public boolean equals(Object obj) {
44 if (obj != null && getClass() != obj.getClass())
46 ComputeFlavor other = (ComputeFlavor) obj;
48 if (num_cpus != other.num_cpus)
50 if (this.disk_size == null) {
51 if (other.disk_size != null)
53 } else if (!disk_size.equals(other.disk_size))
55 if (this.mem_size == null) {
56 if (other.mem_size != null)
58 } else if (!mem_size.equals(other.mem_size))
65 public int hashCode() {
66 int result = num_cpus;
67 result = 31 * result + (disk_size != null ? disk_size.hashCode() : 0);
68 result = 31 * result + (mem_size != null ? mem_size.hashCode() : 0);