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=========================================================
19 * Modifications copyright (c) 2019 Nokia
20 * ================================================================================
23 package org.openecomp.sdc.generator.datatypes.tosca;
25 @SuppressWarnings("CheckStyle")
26 public class DeploymentFlavorModel {
28 private String sp_part_number;
29 private VendorInfo vendor_info;
30 private ComputeFlavor compute_flavor;
31 private LicenseFlavor license_flavor;
33 public String getSp_part_number() {
34 return sp_part_number;
37 public void setSp_part_number(String sp_part_number) {
38 this.sp_part_number = sp_part_number;
41 public VendorInfo getVendor_info() {
45 public void setVendor_info(VendorInfo vendor_info) {
46 this.vendor_info = vendor_info;
49 public ComputeFlavor getCompute_flavor() {
50 return compute_flavor;
53 public void setCompute_flavor(ComputeFlavor compute_flavor) {
54 this.compute_flavor = compute_flavor;
57 public LicenseFlavor getLicense_flavor() {
58 return license_flavor;
61 public void setLicense_flavor(LicenseFlavor license_flavor) {
62 this.license_flavor = license_flavor;
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
75 public boolean equals(Object obj) {
78 if (obj == null || getClass() != obj.getClass())
80 DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
82 if (this.sp_part_number == null) {
83 if (other.sp_part_number != null)
85 } else if (!sp_part_number.equals(other.sp_part_number))
87 if (this.vendor_info == null) {
88 if (other.vendor_info != null)
90 } else if (!vendor_info.equals(other.vendor_info))
92 if (this.compute_flavor == null) {
93 if (other.compute_flavor != null)
95 } else if (!compute_flavor.equals(other.compute_flavor))
97 if (this.license_flavor == null) {
98 if (other.license_flavor != null)
100 } else if (!license_flavor.equals(other.license_flavor))
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);