org.onap migration
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / VolumeGroup.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.onap.vid.model;
22
23 import org.onap.vid.asdc.beans.tosca.Group;
24
25 /**
26  * The Class VolumeGroup.
27  */
28 public class VolumeGroup {
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         /** The customization uuid. */
46         private String customizationUuid;
47         
48         /** The customization uuid. */
49         private String modelCustomizationName;
50         /**
51          * Instantiates a new volume group.
52          */
53         public VolumeGroup() {}
54
55         /**
56          * Gets the uuid.
57          *
58          * @return the uuid
59          */
60         public String getUuid() {
61                 return uuid;
62         }
63         /**
64          * Gets the customization uuid.
65          *
66          * @return the customization uuid
67          */
68         public String getCustomizationUuid() {
69                 return customizationUuid;
70         }
71         /**
72          * Gets the customization name.
73          *
74          * @return the customization name
75          */
76         public String getModelCustomizationName() {
77                 return modelCustomizationName;
78         }
79         /**
80          * Gets the invariant uuid.
81          *
82          * @return the invariant uuid
83          */
84         public String getInvariantUuid() {
85                 return invariantUuid;
86         }
87
88         /**
89          * Gets the description.
90          *
91          * @return the description
92          */
93         public String getDescription() {
94                 return description;
95         }
96
97         /**
98          * Gets the name.
99          *
100          * @return the name
101          */
102         public String getName() {
103                 return name;
104         }
105
106         /**
107          * Gets the version.
108          *
109          * @return the version
110          */
111         public String getVersion() {
112                 return version;
113         }
114
115         /**
116          * Sets the uuid.
117          *
118          * @param uuid the new uuid
119          */
120         public void setUuid(String uuid) {
121                 this.uuid = uuid;
122         }
123
124         /**
125          * Sets the invariant uuid.
126          *
127          * @param invariantUuid the new invariant uuid
128          */
129         public void setInvariantUuid(String invariantUuid) {
130                 this.invariantUuid = invariantUuid;
131         }
132
133         /**
134          * Sets the description.
135          *
136          * @param description the new description
137          */
138         public void setDescription(String description) {
139                 this.description = description;
140         }
141
142         /**
143          * Sets the name.
144          *
145          * @param name the new name
146          */
147         public void setName(String name) {
148                 this.name = name;
149         }
150
151         /**
152          * Sets the version.
153          *
154          * @param version the new version
155          */
156         public void setVersion(String version) {
157                 this.version = version;
158         }
159         /**
160          * Sets the customization uuid.
161          *
162          * @param u the new customization uuid
163          */
164         public void setCustomizationUuid(String u) {
165                 this.customizationUuid = u;
166                 
167         }
168         /**
169          * Sets the customization name.
170          *
171          * @param u the new customization name
172          */
173         public void setModelCustomizationName(String u) {
174                 this.modelCustomizationName = u;
175                 
176         }
177         /**
178          * Extract volume group.
179          *
180          * @param group the group
181          * @return the volume group
182          */
183         public static VolumeGroup extractVolumeGroup(String modelCustomizationName, Group group) {
184                 final VolumeGroup volumeGroup = new VolumeGroup();
185                 
186                 volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID());
187                 volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID());
188                 volumeGroup.setDescription(group.getMetadata().getDescription());
189                 volumeGroup.setName(group.getMetadata().getVfModuleModelName());
190                 volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion());
191                 volumeGroup.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID());
192                 volumeGroup.setModelCustomizationName(modelCustomizationName);
193                 return volumeGroup;
194         }
195
196 }