[VID-3] Setting docker image tag
[vid.git] / vid / src / main / java / org / openecomp / vid / model / Service.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 java.util.Map;
24 import java.util.UUID;
25
26 import org.openecomp.vid.asdc.beans.tosca.Input;
27
28 /**
29  * The Class Service.
30  */
31 public class Service {
32
33         /** The uuid. */
34         private String uuid;
35         
36         /** The invariant uuid. */
37         private String invariantUuid;
38         
39         /** The name. */
40         private String name;
41         
42         /** The version. */
43         private String version;
44         
45         /** The tosca model URL. */
46         private String toscaModelURL;
47         
48         /** The category. */
49         private String category;
50         
51         /** The description. */
52         private String description;
53         
54         /** The inputs. */
55         private Map<String, Input> inputs;
56         
57         /**
58          * Gets the uuid.
59          *
60          * @return the uuid
61          */
62         public String getUuid() {
63                 return uuid;
64         }
65         
66         /**
67          * Gets the invariant uuid.
68          *
69          * @return the invariant uuid
70          */
71         public String getInvariantUuid() {
72                 return invariantUuid;
73         }
74         
75         /**
76          * Gets the name.
77          *
78          * @return the name
79          */
80         public String getName() {
81                 return name;
82         }
83         
84         /**
85          * Gets the version.
86          *
87          * @return the version
88          */
89         public String getVersion() {
90                 return version;
91         }
92         
93         /**
94          * Gets the tosca model URL.
95          *
96          * @return the tosca model URL
97          */
98         public String getToscaModelURL() {
99                 return toscaModelURL;
100         }
101         
102         /**
103          * Gets the category.
104          *
105          * @return the category
106          */
107         public String getCategory() {
108                 return category;
109         }
110         
111         /**
112          * Gets the description.
113          *
114          * @return the description
115          */
116         public String getDescription() {
117                 return description;
118         }
119         
120         /**
121          * Gets the inputs.
122          *
123          * @return the inputs
124          */
125         public Map<String, Input> getInputs() {
126                 return inputs;
127         }
128         
129         /**
130          * Sets the uuid.
131          *
132          * @param uuid the new uuid
133          */
134         public void setUuid(String uuid) {
135                 this.uuid = uuid;
136         }
137         
138         /**
139          * Sets the invariant uuid.
140          *
141          * @param invariantUuid the new invariant uuid
142          */
143         public void setInvariantUuid(String invariantUuid) {
144                 this.invariantUuid = invariantUuid;
145         }
146         
147         /**
148          * Sets the name.
149          *
150          * @param name the new name
151          */
152         public void setName(String name) {
153                 this.name = name;
154         }
155         
156         /**
157          * Sets the version.
158          *
159          * @param version the new version
160          */
161         public void setVersion(String version) {
162                 this.version = version;
163         }
164         
165         /**
166          * Sets the tosca model URL.
167          *
168          * @param toscaModelURL the new tosca model URL
169          */
170         public void setToscaModelURL(String toscaModelURL) {
171                 this.toscaModelURL = toscaModelURL;
172         }
173         
174         /**
175          * Sets the category.
176          *
177          * @param category the new category
178          */
179         public void setCategory(String category) {
180                 this.category = category;
181         }
182         
183         /**
184          * Sets the description.
185          *
186          * @param description the new description
187          */
188         public void setDescription(String description) {
189                 this.description = description;
190         }
191         
192         /**
193          * Sets the inputs.
194          *
195          * @param inputs the inputs
196          */
197         public void setInputs(Map<String, Input> inputs) {
198                 this.inputs = inputs;
199         }
200
201         /* (non-Javadoc)
202          * @see java.lang.Object#hashCode()
203          */
204         @Override
205         public int hashCode() {
206                 final UUID uuid = UUID.fromString(getUuid());
207                 
208                 return uuid.hashCode();
209         }
210         
211         /* (non-Javadoc)
212          * @see java.lang.Object#equals(java.lang.Object)
213          */
214         @Override
215         public boolean equals(Object o) {
216                 if (o == this) return true;
217                 if (!(o instanceof Service)) return false;
218                 
219                 final Service service = (Service) o;
220                 
221                 return (service.getUuid().equals(getUuid()));
222         }
223 }