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=========================================================
21 package org.openecomp.sdc.ci.tests.tosca.datatypes;
23 import org.yaml.snakeyaml.TypeDescription;
25 public class ToscaGroupPropertyDefinition {
27 public String min_vf_module_instances;
28 public String max_vf_module_instances;
29 public String vf_module_label;
30 public String vfc_list;
31 public String vf_module_type;
32 public String vf_module_description;
33 public String initial_count;
34 public String volume_group;
35 public String availability_zone_count;
37 public ToscaGroupPropertyDefinition() {
40 public String getMin_vf_module_instances() {
41 return min_vf_module_instances;
44 public void setMin_vf_module_instances(String min_vf_module_instances) {
45 this.min_vf_module_instances = min_vf_module_instances;
48 public String getMax_vf_module_instances() {
49 return max_vf_module_instances;
52 public void setMax_vf_module_instances(String max_vf_module_instances) {
53 this.max_vf_module_instances = max_vf_module_instances;
56 public String getVf_module_label() {
57 return vf_module_label;
60 public void setVf_module_label(String vf_module_label) {
61 this.vf_module_label = vf_module_label;
64 public String getVfc_list() {
68 public void setVfc_list(String vfc_list) {
69 this.vfc_list = vfc_list;
72 public String getVf_module_type() {
73 return vf_module_type;
76 public void setVf_module_type(String vf_module_type) {
77 this.vf_module_type = vf_module_type;
80 public String getVf_module_description() {
81 return vf_module_description;
84 public void setVf_module_description(String vf_module_description) {
85 this.vf_module_description = vf_module_description;
88 public String getInitial_count() {
92 public void setInitial_count(String initial_count) {
93 this.initial_count = initial_count;
96 public String getVolume_group() {
100 public void setVolume_group(String volume_group) {
101 this.volume_group = volume_group;
104 public String getAvailability_zone_count() {
105 return availability_zone_count;
108 public void setAvailability_zone_count(String availability_zone_count) {
109 this.availability_zone_count = availability_zone_count;
113 public String toString() {
114 return "ToscaGroupPropertyDefinition{" +
115 ", min_vf_module_instances='" + min_vf_module_instances + '\'' +
116 ", max_vf_module_instances='" + max_vf_module_instances + '\'' +
117 ", vf_module_label='" + vf_module_label + '\'' +
118 ", vfc_list='" + vfc_list + '\'' +
119 ", vf_module_type='" + vf_module_type + '\'' +
120 ", vf_module_description='" + vf_module_description + '\'' +
121 ", initial_count='" + initial_count + '\'' +
122 ", volume_group='" + volume_group + '\'' +
123 ", availability_zone_count='" + availability_zone_count + '\'' +
127 //gets Type description for Yaml snake
128 public static TypeDescription getTypeDescription(){
129 TypeDescription typeDescription = new TypeDescription(ToscaGroupPropertyDefinition.class);
130 return typeDescription;
134 public boolean equals(Object o) {
135 if (this == o) return true;
136 if (o == null || getClass() != o.getClass()) return false;
138 ToscaGroupPropertyDefinition that = (ToscaGroupPropertyDefinition) o;
140 if (min_vf_module_instances != null ? !min_vf_module_instances.equals(that.min_vf_module_instances) : that.min_vf_module_instances != null)
142 if (max_vf_module_instances != null ? !max_vf_module_instances.equals(that.max_vf_module_instances) : that.max_vf_module_instances != null)
144 if (vf_module_label != null ? !vf_module_label.equals(that.vf_module_label) : that.vf_module_label != null)
146 if (vfc_list != null ? !vfc_list.equals(that.vfc_list) : that.vfc_list != null) return false;
147 if (vf_module_type != null ? !vf_module_type.equals(that.vf_module_type) : that.vf_module_type != null)
149 if (vf_module_description != null ? !vf_module_description.equals(that.vf_module_description) : that.vf_module_description != null)
151 if (initial_count != null ? !initial_count.equals(that.initial_count) : that.initial_count != null)
153 if (volume_group != null ? !volume_group.equals(that.volume_group) : that.volume_group != null) return false;
154 return availability_zone_count != null ? availability_zone_count.equals(that.availability_zone_count) : that.availability_zone_count == null;
158 public int hashCode() {
159 int result = min_vf_module_instances != null ? min_vf_module_instances.hashCode() : 0;
160 result = 31 * result + (max_vf_module_instances != null ? max_vf_module_instances.hashCode() : 0);
161 result = 31 * result + (vf_module_label != null ? vf_module_label.hashCode() : 0);
162 result = 31 * result + (vfc_list != null ? vfc_list.hashCode() : 0);
163 result = 31 * result + (vf_module_type != null ? vf_module_type.hashCode() : 0);
164 result = 31 * result + (vf_module_description != null ? vf_module_description.hashCode() : 0);
165 result = 31 * result + (initial_count != null ? initial_count.hashCode() : 0);
166 result = 31 * result + (volume_group != null ? volume_group.hashCode() : 0);
167 result = 31 * result + (availability_zone_count != null ? availability_zone_count.hashCode() : 0);