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=========================================================
21 package org.openecomp.mso.db.catalog.beans;
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class NetworkResource extends MavenLikeVersioning implements Serializable {
31 private static final long serialVersionUID = 768026109321305392L;
33 private String orchestrationMode = null;
34 private String description = null;
35 private String neutronNetworkType = null;
36 private String aicVersionMin = null;
37 private String aicVersionMax = null;
38 private String modelName;
39 private String modelInvariantUUID;
40 private String modelVersion;
41 private String toscaNodeType;
42 private Timestamp created;
43 private String modelUUID;
44 private String heatTemplateArtifactUUID;
46 public NetworkResource() {}
48 public String getOrchestrationMode() {
49 return orchestrationMode;
52 public void setOrchestrationMode(String orchestrationMode) {
53 this.orchestrationMode = orchestrationMode;
56 public String getDescription() {
59 public void setDescription(String description) {
60 this.description = description;
63 public String getNeutronNetworkType() {
64 return neutronNetworkType;
67 public void setNeutronNetworkType(String neutronNetworkType) {
68 this.neutronNetworkType = neutronNetworkType;
71 public Timestamp getCreated() {
75 public void setCreated(Timestamp created) {
76 this.created = created;
79 public String getAicVersionMin() {
83 public void setAicVersionMin(String aicVersionMin) {
84 this.aicVersionMin = aicVersionMin;
87 public String getAicVersionMax() {
91 public void setAicVersionMax(String aicVersionMax) {
92 this.aicVersionMax = aicVersionMax;
95 public String getModelName() {
99 public void setModelName(String modelName) {
100 this.modelName = modelName;
103 public String getModelInvariantUUID() {
104 return modelInvariantUUID;
107 public void setModelInvariantUUID(String modelInvariantUUID) {
108 this.modelInvariantUUID = modelInvariantUUID;
111 public String getToscaNodeType() {
112 return toscaNodeType;
115 public void setToscaNodeType(String toscaNodeType) {
116 this.toscaNodeType = toscaNodeType;
119 public String getModelUUID() {
123 public void setModelUUID(String modelUUID) {
124 this.modelUUID = modelUUID;
127 public String getHeatTemplateArtifactUUID() {
128 return heatTemplateArtifactUUID;
131 public void setHeatTemplateArtifactUUID(String heatTemplateArtifactUUID) {
132 this.heatTemplateArtifactUUID = heatTemplateArtifactUUID;
135 public String getModelVersion() {
139 public void setModelVersion(String modelVersion) {
140 this.modelVersion = modelVersion;
144 public String toString () {
145 StringBuffer sb = new StringBuffer();
146 sb.append("NETWORK Resource:");
147 sb.append("modelVersion=");
148 sb.append(modelVersion);
150 sb.append(orchestrationMode);
151 sb.append(",neutronType=");
152 sb.append(neutronNetworkType);
153 sb.append(",aicVersionMin=");
154 sb.append(aicVersionMin);
155 sb.append(",aicVersionMax=");
156 sb.append(aicVersionMax);
157 sb.append(",modelName=");
158 sb.append(modelName);
159 sb.append(",modelInvariantUUID=");
160 sb.append(modelInvariantUUID);
161 sb.append(",toscaNodeType=");
162 sb.append(toscaNodeType);
163 sb.append(",modelUUID=");
164 sb.append(modelUUID);
165 sb.append(",heatTemplateArtifactUUID=");
166 sb.append(heatTemplateArtifactUUID);
168 if (created != null) {
169 sb.append (",created=");
170 sb.append (DateFormat.getInstance().format(created));
173 return sb.toString();