Change the header to SO
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VnfResourceCustomization.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 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 package org.openecomp.mso.db.catalog.beans;
21
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24 import java.util.ArrayList;
25 import java.util.List;
26 import java.util.Set;
27
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29
30 public class VnfResourceCustomization extends MavenLikeVersioning implements Serializable {
31
32         private static final long serialVersionUID = 768026109321305392L;
33         
34         private String modelCustomizationUuid = null;
35         private String modelInstanceName;
36         private Timestamp created;
37         private String vnfResourceModelUuid = null;
38         private String vnfResourceModelUUID;
39         private Integer minInstances;
40         private Integer maxInstances;
41         private Integer availabilityZoneMaxCount;
42         private VnfResource vnfResource;
43         private String nfFunction;
44         private String nfType;
45         private String nfRole;
46         private String nfNamingCode;
47     private List<VfModuleCustomization> vfModuleCustomizations;
48     private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
49
50         public VnfResourceCustomization() {
51         }
52
53
54         public String getModelCustomizationUuid() {
55                 return modelCustomizationUuid;
56         }
57
58         public void setModelCustomizationUuid(String modelCustomizationUuid) {
59                 this.modelCustomizationUuid = modelCustomizationUuid;
60         }
61
62         public String getModelInstanceName() {
63                 return this.modelInstanceName;
64         }
65         public void setModelInstanceName(String modelInstanceName) {
66                 this.modelInstanceName = modelInstanceName;
67         }
68
69         public Timestamp getCreationTimestamp() {
70                 return this.created;
71         }
72         public void setCreationTimestamp(Timestamp created) {
73                 this.created = created;
74         }
75
76         public String getVnfResourceModelUuid() {
77                 return this.vnfResourceModelUuid == null ? this.vnfResourceModelUUID : this.vnfResourceModelUuid;
78         }
79         public void setVnfResourceModelUuid(String vnfResourceModelUuid) {
80                 this.vnfResourceModelUuid = vnfResourceModelUuid;
81         }
82         public String getVnfResourceModelUUID() {
83                 return this.vnfResourceModelUUID;
84         }
85         public void setVnfResourceModelUUID(String vnfResourceModelUUID) {
86                 this.vnfResourceModelUUID = vnfResourceModelUUID;
87         }
88         public Integer getMinInstances() {
89                 return this.minInstances;
90         }
91         public void setMinInstances(Integer minInstances) {
92                 this.minInstances = minInstances;
93         }
94
95         public Integer getMaxInstances() {
96                 return this.maxInstances;
97         }
98         public void setMaxInstances(Integer maxInstances) {
99                 this.maxInstances = maxInstances;
100         }
101
102         public Integer getAvailabilityZoneMaxCount() {
103                 return this.availabilityZoneMaxCount;
104         }
105         public void setAvailabilityZoneMaxCount(Integer availabilityZoneMaxCount) {
106                 this.availabilityZoneMaxCount = availabilityZoneMaxCount;
107         }
108
109         public VnfResource getVnfResource() {
110                 return this.vnfResource;
111         }
112         public void setVnfResource(VnfResource vnfResource) {
113                 this.vnfResource = vnfResource;
114         }
115
116         public String getNfFunction() {
117                 return nfFunction;
118         }
119
120         public void setNfFunction(String nfFunction) {
121                 this.nfFunction = nfFunction;
122         }
123
124         public String getNfType() {
125                 return nfType;
126         }
127
128         public void setNfType(String nfType) {
129                 this.nfType = nfType;
130         }
131
132         public String getNfRole() {
133                 return nfRole;
134         }
135
136         public void setNfRole(String nfRole) {
137                 this.nfRole = nfRole;
138         }
139
140         public String getNfNamingCode() {
141                 return nfNamingCode;
142         }
143
144         public void setNfNamingCode(String nfNamingCode) {
145                 this.nfNamingCode = nfNamingCode;
146         }
147         public List<VfModuleCustomization> getVfModuleCustomizations() {
148                 return this.vfModuleCustomizations;
149         }
150         public void setVfModuleCustomizations(ArrayList<VfModuleCustomization> vfModuleCustomizations) {
151                 this.vfModuleCustomizations = vfModuleCustomizations;
152         }
153         public void addVfModuleCustomization(VfModuleCustomization vfmc) {
154                 if (vfmc != null) {
155                         if (this.vfModuleCustomizations != null) {
156                                 this.vfModuleCustomizations.add(vfmc);
157                         } else {
158                                 this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
159                                 this.vfModuleCustomizations.add(vfmc);
160                         }
161                 }
162         }
163         public Timestamp getCreated() {
164                 return created;
165         }
166
167         public void setCreated(Timestamp created) {
168                 this.created = created;
169         }
170
171         public Set<ServiceToResourceCustomization> getServiceResourceCustomizations() {
172                 return serviceResourceCustomizations;
173         }
174
175         public void setServiceResourceCustomizations(
176                         Set<ServiceToResourceCustomization> serviceResourceCustomizations) {
177                 this.serviceResourceCustomizations = serviceResourceCustomizations;
178         }
179
180         @Override
181         public String toString() {
182                 StringBuilder sb = new StringBuilder("VnfResourceCustomization: ");
183                 sb.append("ModelCustUuid=" + this.modelCustomizationUuid ); 
184                 sb.append(", ModelInstanceName=" + this.modelInstanceName);
185                 sb.append(", vnfResourceModelUuid=" + this.vnfResourceModelUUID); 
186                 sb.append(", creationTimestamp=" + this.created); 
187                 sb.append(", minInstances=" + this.minInstances);
188                 sb.append(", maxInstances=" + this.maxInstances);
189                 sb.append(", availabilityZoneMaxCount=" + this.availabilityZoneMaxCount);
190 //              sb.append(", vnfResource:\n" + this.vnfResource == null ? "null" : this.vnfResource.toString());
191                 sb.append(", nfFunction=" + this.nfFunction); 
192                 sb.append(", nfType=" + this.nfType);
193                 sb.append(", nfRole=" + this.nfRole);
194                 sb.append(", nfNamingCode=" + this.nfNamingCode);
195                 
196                 return sb.toString();
197         }
198
199 }