aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/DeploymentFlavorModel.java
blob: 62705a28b6231f1c96f8c2db7912cee776403085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

package org.openecomp.sdc.generator.datatypes.tosca;

@SuppressWarnings("CheckStyle")
public class DeploymentFlavorModel {

  private String sp_part_number;
  private VendorInfo vendor_info;
  private ComputeFlavor compute_flavor;
  private LicenseFlavor license_flavor;

  public String getSp_part_number() {
    return sp_part_number;
  }

  public void setSp_part_number(String sp_part_number) {
    this.sp_part_number = sp_part_number;
  }

  public VendorInfo getVendor_info() {
    return vendor_info;
  }

  public void setVendor_info(VendorInfo vendor_info) {
    this.vendor_info = vendor_info;
  }

  public ComputeFlavor getCompute_flavor() {
    return compute_flavor;
  }

  public void setCompute_flavor(ComputeFlavor compute_flavor) {
    this.compute_flavor = compute_flavor;
  }

  public LicenseFlavor getLicense_flavor() {
    return license_flavor;
  }

  public void setLicense_flavor(LicenseFlavor license_flavor) {
    this.license_flavor = license_flavor;
  }

  @Override
  public String toString() {
    return "DeploymentFlavorModel{" + "sp_part_number='" + sp_part_number + '\''
        + ", vendor_info=" + vendor_info
        + ", compute_flavor=" + compute_flavor
        + ", license_flavor=" + license_flavor
        + '}';
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj != null && getClass() != obj.getClass())
      return false;
    DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
    if (other != null) {
      if (this.sp_part_number == null) {
        if (other.sp_part_number != null)
          return false;
      } else if (!sp_part_number.equals(other.sp_part_number))
        return false;
      if (this.vendor_info == null) {
        if (other.vendor_info != null)
          return false;
      } else if (!vendor_info.equals(other.vendor_info))
        return false;
      if (this.compute_flavor == null) {
        if (other.compute_flavor != null)
          return false;
      } else if (!compute_flavor.equals(other.compute_flavor))
        return false;
      if (this.license_flavor == null) {
        if (other.license_flavor != null)
          return false;
      } else if (!license_flavor.equals(other.license_flavor))
        return false;
    }
    return true;
  }

  @Override
  public int hashCode() {
    int result = sp_part_number != null ? sp_part_number.hashCode() : 0;
    result = 31 * result + (vendor_info != null ? vendor_info.hashCode() : 0);
    result = 31 * result + (compute_flavor != null ? compute_flavor.hashCode() : 0);
    result = 31 * result + (license_flavor != null ? license_flavor.hashCode() : 0);
    return result;
  }
}