2 * ============LICENSE_START=======================================================
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
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=========================================================
20 package org.openecomp.mso.db.catalog.beans;
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24 import java.util.ArrayList;
25 import java.util.List;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
30 public class VnfResourceCustomization extends MavenLikeVersioning implements Serializable {
32 private static final long serialVersionUID = 768026109321305392L;
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;
50 public VnfResourceCustomization() {
54 public String getModelCustomizationUuid() {
55 return modelCustomizationUuid;
58 public void setModelCustomizationUuid(String modelCustomizationUuid) {
59 this.modelCustomizationUuid = modelCustomizationUuid;
62 public String getModelInstanceName() {
63 return this.modelInstanceName;
65 public void setModelInstanceName(String modelInstanceName) {
66 this.modelInstanceName = modelInstanceName;
69 public Timestamp getCreationTimestamp() {
72 public void setCreationTimestamp(Timestamp created) {
73 this.created = created;
76 public String getVnfResourceModelUuid() {
77 return this.vnfResourceModelUuid == null ? this.vnfResourceModelUUID : this.vnfResourceModelUuid;
79 public void setVnfResourceModelUuid(String vnfResourceModelUuid) {
80 this.vnfResourceModelUuid = vnfResourceModelUuid;
82 public String getVnfResourceModelUUID() {
83 return this.vnfResourceModelUUID;
85 public void setVnfResourceModelUUID(String vnfResourceModelUUID) {
86 this.vnfResourceModelUUID = vnfResourceModelUUID;
88 public Integer getMinInstances() {
89 return this.minInstances;
91 public void setMinInstances(Integer minInstances) {
92 this.minInstances = minInstances;
95 public Integer getMaxInstances() {
96 return this.maxInstances;
98 public void setMaxInstances(Integer maxInstances) {
99 this.maxInstances = maxInstances;
102 public Integer getAvailabilityZoneMaxCount() {
103 return this.availabilityZoneMaxCount;
105 public void setAvailabilityZoneMaxCount(Integer availabilityZoneMaxCount) {
106 this.availabilityZoneMaxCount = availabilityZoneMaxCount;
109 public VnfResource getVnfResource() {
110 return this.vnfResource;
112 public void setVnfResource(VnfResource vnfResource) {
113 this.vnfResource = vnfResource;
116 public String getNfFunction() {
120 public void setNfFunction(String nfFunction) {
121 this.nfFunction = nfFunction;
124 public String getNfType() {
128 public void setNfType(String nfType) {
129 this.nfType = nfType;
132 public String getNfRole() {
136 public void setNfRole(String nfRole) {
137 this.nfRole = nfRole;
140 public String getNfNamingCode() {
144 public void setNfNamingCode(String nfNamingCode) {
145 this.nfNamingCode = nfNamingCode;
147 public List<VfModuleCustomization> getVfModuleCustomizations() {
148 return this.vfModuleCustomizations;
150 public void setVfModuleCustomizations(ArrayList<VfModuleCustomization> vfModuleCustomizations) {
151 this.vfModuleCustomizations = vfModuleCustomizations;
153 public void addVfModuleCustomization(VfModuleCustomization vfmc) {
155 if (this.vfModuleCustomizations != null) {
156 this.vfModuleCustomizations.add(vfmc);
158 this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
159 this.vfModuleCustomizations.add(vfmc);
163 public Timestamp getCreated() {
167 public void setCreated(Timestamp created) {
168 this.created = created;
171 public Set<ServiceToResourceCustomization> getServiceResourceCustomizations() {
172 return serviceResourceCustomizations;
175 public void setServiceResourceCustomizations(
176 Set<ServiceToResourceCustomization> serviceResourceCustomizations) {
177 this.serviceResourceCustomizations = serviceResourceCustomizations;
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);
196 return sb.toString();