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.vid.model;
23 import org.openecomp.vid.asdc.beans.tosca.NodeTemplate;
28 public class Network {
33 /** The invariant uuid. */
34 private String invariantUuid;
36 /** The description. */
37 private String description;
43 private String version;
46 * Instantiates a new network.
55 public String getUuid() {
60 * Gets the invariant uuid.
62 * @return the invariant uuid
64 public String getInvariantUuid() {
69 * Gets the description.
71 * @return the description
73 public String getDescription() {
82 public String getName() {
91 public String getVersion() {
98 * @param uuid the new uuid
100 public void setUuid(String uuid) {
105 * Sets the invariant uuid.
107 * @param invariantUuid the new invariant uuid
109 public void setInvariantUuid(String invariantUuid) {
110 this.invariantUuid = invariantUuid;
114 * Sets the description.
116 * @param description the new description
118 public void setDescription(String description) {
119 this.description = description;
125 * @param name the new name
127 public void setName(String name) {
134 * @param version the new version
136 public void setVersion(String version) {
137 this.version = version;
143 * @param nodeTemplate the node template
144 * @return the network
146 public static Network extractNetwork(NodeTemplate nodeTemplate) {
147 final Network network = new Network();
149 network.setUuid(nodeTemplate.getMetadata().getUUID());
150 network.setInvariantUuid(nodeTemplate.getMetadata().getInvariantUUID());
151 network.setDescription(nodeTemplate.getMetadata().getDescription());
152 network.setName(nodeTemplate.getMetadata().getName());
153 network.setVersion(nodeTemplate.getMetadata().getVersion());