[VID-3] Setting docker image tag
[vid.git] / vid / src / main / java / org / openecomp / vid / model / Network.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
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
21 package org.openecomp.vid.model;
22
23 import org.openecomp.vid.asdc.beans.tosca.NodeTemplate;
24
25 /**
26  * The Class Network.
27  */
28 public class Network {
29
30         /** The uuid. */
31         private String uuid;
32         
33         /** The invariant uuid. */
34         private String invariantUuid;
35         
36         /** The description. */
37         private String description;
38         
39         /** The name. */
40         private String name;
41         
42         /** The version. */
43         private String version;
44         
45         /**
46          * Instantiates a new network.
47          */
48         public Network() {}
49
50         /**
51          * Gets the uuid.
52          *
53          * @return the uuid
54          */
55         public String getUuid() {
56                 return uuid;
57         }
58
59         /**
60          * Gets the invariant uuid.
61          *
62          * @return the invariant uuid
63          */
64         public String getInvariantUuid() {
65                 return invariantUuid;
66         }
67
68         /**
69          * Gets the description.
70          *
71          * @return the description
72          */
73         public String getDescription() {
74                 return description;
75         }
76
77         /**
78          * Gets the name.
79          *
80          * @return the name
81          */
82         public String getName() {
83                 return name;
84         }
85
86         /**
87          * Gets the version.
88          *
89          * @return the version
90          */
91         public String getVersion() {
92                 return version;
93         }
94
95         /**
96          * Sets the uuid.
97          *
98          * @param uuid the new uuid
99          */
100         public void setUuid(String uuid) {
101                 this.uuid = uuid;
102         }
103
104         /**
105          * Sets the invariant uuid.
106          *
107          * @param invariantUuid the new invariant uuid
108          */
109         public void setInvariantUuid(String invariantUuid) {
110                 this.invariantUuid = invariantUuid;
111         }
112
113         /**
114          * Sets the description.
115          *
116          * @param description the new description
117          */
118         public void setDescription(String description) {
119                 this.description = description;
120         }
121
122         /**
123          * Sets the name.
124          *
125          * @param name the new name
126          */
127         public void setName(String name) {
128                 this.name = name;
129         }
130
131         /**
132          * Sets the version.
133          *
134          * @param version the new version
135          */
136         public void setVersion(String version) {
137                 this.version = version;
138         }
139
140         /**
141          * Extract network.
142          *
143          * @param nodeTemplate the node template
144          * @return the network
145          */
146         public static Network extractNetwork(NodeTemplate nodeTemplate) {
147                 final Network network = new Network();
148                 
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());
154                 
155                 return network;
156         }
157 }