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;
24 import java.util.UUID;
26 import org.openecomp.vid.asdc.beans.tosca.Input;
31 public class Service {
36 /** The invariant uuid. */
37 private String invariantUuid;
43 private String version;
45 /** The tosca model URL. */
46 private String toscaModelURL;
49 private String category;
51 /** The description. */
52 private String description;
55 private Map<String, Input> inputs;
62 public String getUuid() {
67 * Gets the invariant uuid.
69 * @return the invariant uuid
71 public String getInvariantUuid() {
80 public String getName() {
89 public String getVersion() {
94 * Gets the tosca model URL.
96 * @return the tosca model URL
98 public String getToscaModelURL() {
105 * @return the category
107 public String getCategory() {
112 * Gets the description.
114 * @return the description
116 public String getDescription() {
125 public Map<String, Input> getInputs() {
132 * @param uuid the new uuid
134 public void setUuid(String uuid) {
139 * Sets the invariant uuid.
141 * @param invariantUuid the new invariant uuid
143 public void setInvariantUuid(String invariantUuid) {
144 this.invariantUuid = invariantUuid;
150 * @param name the new name
152 public void setName(String name) {
159 * @param version the new version
161 public void setVersion(String version) {
162 this.version = version;
166 * Sets the tosca model URL.
168 * @param toscaModelURL the new tosca model URL
170 public void setToscaModelURL(String toscaModelURL) {
171 this.toscaModelURL = toscaModelURL;
177 * @param category the new category
179 public void setCategory(String category) {
180 this.category = category;
184 * Sets the description.
186 * @param description the new description
188 public void setDescription(String description) {
189 this.description = description;
195 * @param inputs the inputs
197 public void setInputs(Map<String, Input> inputs) {
198 this.inputs = inputs;
202 * @see java.lang.Object#hashCode()
205 public int hashCode() {
206 final UUID uuid = UUID.fromString(getUuid());
208 return uuid.hashCode();
212 * @see java.lang.Object#equals(java.lang.Object)
215 public boolean equals(Object o) {
216 if (o == this) return true;
217 if (!(o instanceof Service)) return false;
219 final Service service = (Service) o;
221 return (service.getUuid().equals(getUuid()));