2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 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.onap.vid.model;
23 import org.onap.vid.asdc.beans.tosca.Input;
26 import java.util.UUID;
31 public class NewService {
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;
54 /** The service ecomp naming flag */
55 private String serviceEcompNaming;
58 private Map<String, Input> inputs;
65 public String getUuid() {
70 * Gets the invariant uuid.
72 * @return the invariant uuid
74 public String getInvariantUuid() {
83 public String getName() {
92 public String getVersion() {
97 * Gets the tosca model URL.
99 * @return the tosca model URL
101 public String getToscaModelURL() {
102 return toscaModelURL;
108 * @return the category
110 public String getCategory() {
115 * Gets the description.
117 * @return the description
119 public String getDescription() {
128 public Map<String, Input> getInputs() {
132 * Get the serviceEcompNaming value
134 * @return serviceEcompNaming
136 public String getServiceEcompNaming() {
137 return serviceEcompNaming;
142 * @param uuid the new uuid
144 public void setUuid(String uuid) {
149 * Sets the invariant uuid.
151 * @param invariantUuid the new invariant uuid
153 public void setInvariantUuid(String invariantUuid) {
154 this.invariantUuid = invariantUuid;
160 * @param name the new name
162 public void setName(String name) {
169 * @param version the new version
171 public void setVersion(String version) {
172 this.version = version;
176 * Sets the tosca model URL.
178 * @param toscaModelURL the new tosca model URL
180 public void setToscaModelURL(String toscaModelURL) {
181 this.toscaModelURL = toscaModelURL;
187 * @param category the new category
189 public void setCategory(String category) {
190 this.category = category;
194 * Sets the description.
196 * @param description the new description
198 public void setDescription(String description) {
199 this.description = description;
205 * @param inputs the inputs
207 public void setInputs(Map<String, Input> inputs) {
208 this.inputs = inputs;
211 * Sets the service ecomp naming.
213 * @param serviceEcompNaming the new service ecomp naming
215 public void setServiceEcompNaming(String serviceEcompNaming) {
216 this.serviceEcompNaming = serviceEcompNaming;
219 * @see java.lang.Object#hashCode()
222 public int hashCode() {
223 return UUID.fromString(getUuid()).hashCode();
227 * @see java.lang.Object#equals(java.lang.Object)
230 public boolean equals(Object o) {
231 if (o == this) return true;
232 if (!(o instanceof NewService)) return false;
234 final NewService service = (NewService) o;
236 return (service.getUuid().equals(getUuid()));