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 (getClass() != obj.getClass())
46 ComputeFlavor other = (ComputeFlavor) obj;
47 if (num_cpus != other.num_cpus)
49 if (this.disk_size == null) {
50 if (other.disk_size != null)
52 } else if (!disk_size.equals(other.disk_size))
54 if (this.mem_size == null) {
55 if (other.mem_size != null)
57 } else if (!mem_size.equals(other.mem_size))
63 public int hashCode() {
64 int result = num_cpus;
65 result = 31 * result + (disk_size != null ? disk_size.hashCode() : 0);
66 result = 31 * result + (mem_size != null ? mem_size.hashCode() : 0);