2474c1b6d8bd72d638438e08b4111eed0cdb9775
[sdc.git] /
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  * Modifications copyright (c) 2019 Nokia
20  * ================================================================================
21  */
22
23 package org.openecomp.sdc.generator.datatypes.tosca;
24
25 @SuppressWarnings("CheckStyle")
26 public class DeploymentFlavorModel {
27
28   private String sp_part_number;
29   private VendorInfo vendor_info;
30   private ComputeFlavor compute_flavor;
31   private LicenseFlavor license_flavor;
32
33   public String getSp_part_number() {
34     return sp_part_number;
35   }
36
37   public void setSp_part_number(String sp_part_number) {
38     this.sp_part_number = sp_part_number;
39   }
40
41   public VendorInfo getVendor_info() {
42     return vendor_info;
43   }
44
45   public void setVendor_info(VendorInfo vendor_info) {
46     this.vendor_info = vendor_info;
47   }
48
49   public ComputeFlavor getCompute_flavor() {
50     return compute_flavor;
51   }
52
53   public void setCompute_flavor(ComputeFlavor compute_flavor) {
54     this.compute_flavor = compute_flavor;
55   }
56
57   public LicenseFlavor getLicense_flavor() {
58     return license_flavor;
59   }
60
61   public void setLicense_flavor(LicenseFlavor license_flavor) {
62     this.license_flavor = license_flavor;
63   }
64
65   @Override
66   public String toString() {
67     return "DeploymentFlavorModel{" + "sp_part_number='" + sp_part_number + '\''
68         + ", vendor_info=" + vendor_info
69         + ", compute_flavor=" + compute_flavor
70         + ", license_flavor=" + license_flavor
71         + '}';
72   }
73
74   @Override
75   public boolean equals(Object obj) {
76     if (this == obj)
77       return true;
78     if (obj == null || getClass() != obj.getClass())
79       return false;
80     DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
81
82       if (this.sp_part_number == null) {
83         if (other.sp_part_number != null)
84           return false;
85       } else if (!sp_part_number.equals(other.sp_part_number))
86         return false;
87       if (this.vendor_info == null) {
88         if (other.vendor_info != null)
89           return false;
90       } else if (!vendor_info.equals(other.vendor_info))
91         return false;
92       if (this.compute_flavor == null) {
93         if (other.compute_flavor != null)
94           return false;
95       } else if (!compute_flavor.equals(other.compute_flavor))
96         return false;
97       if (this.license_flavor == null) {
98         if (other.license_flavor != null)
99           return false;
100       } else if (!license_flavor.equals(other.license_flavor))
101         return false;
102
103     return true;
104   }
105
106   @Override
107   public int hashCode() {
108     int result = sp_part_number != null ? sp_part_number.hashCode() : 0;
109     result = 31 * result + (vendor_info != null ? vendor_info.hashCode() : 0);
110     result = 31 * result + (compute_flavor != null ? compute_flavor.hashCode() : 0);
111     result = 31 * result + (license_flavor != null ? license_flavor.hashCode() : 0);
112     return result;
113   }
114 }