Added oparent to sdc main
[sdc.git] / openecomp-be / lib / openecomp-sdc-tosca-generator-lib / openecomp-sdc-tosca-generator-api / src / main / java / org / openecomp / sdc / generator / datatypes / tosca / DeploymentFlavorModel.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.generator.datatypes.tosca;
22
23 @SuppressWarnings("CheckStyle")
24 public class DeploymentFlavorModel {
25
26   private String sp_part_number;
27   private VendorInfo vendor_info;
28   private ComputeFlavor compute_flavor;
29   private LicenseFlavor license_flavor;
30
31   public String getSp_part_number() {
32     return sp_part_number;
33   }
34
35   public void setSp_part_number(String sp_part_number) {
36     this.sp_part_number = sp_part_number;
37   }
38
39   public VendorInfo getVendor_info() {
40     return vendor_info;
41   }
42
43   public void setVendor_info(VendorInfo vendor_info) {
44     this.vendor_info = vendor_info;
45   }
46
47   public ComputeFlavor getCompute_flavor() {
48     return compute_flavor;
49   }
50
51   public void setCompute_flavor(ComputeFlavor compute_flavor) {
52     this.compute_flavor = compute_flavor;
53   }
54
55   public LicenseFlavor getLicense_flavor() {
56     return license_flavor;
57   }
58
59   public void setLicense_flavor(LicenseFlavor license_flavor) {
60     this.license_flavor = license_flavor;
61   }
62
63   @Override
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
69         + '}';
70   }
71
72   @Override
73   public boolean equals(Object obj) {
74     if (this == obj)
75       return true;
76     if (obj != null && getClass() != obj.getClass())
77       return false;
78     DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
79     if (other != null) {
80       if (this.sp_part_number == null) {
81         if (other.sp_part_number != null)
82           return false;
83       } else if (!sp_part_number.equals(other.sp_part_number))
84         return false;
85       if (this.vendor_info == null) {
86         if (other.vendor_info != null)
87           return false;
88       } else if (!vendor_info.equals(other.vendor_info))
89         return false;
90       if (this.compute_flavor == null) {
91         if (other.compute_flavor != null)
92           return false;
93       } else if (!compute_flavor.equals(other.compute_flavor))
94         return false;
95       if (this.license_flavor == null) {
96         if (other.license_flavor != null)
97           return false;
98       } else if (!license_flavor.equals(other.license_flavor))
99         return false;
100     }
101     return true;
102   }
103
104   @Override
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);
110     return result;
111   }
112 }