3 * Copyright (c) 2017 Orange. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
19 * open API16.5 + applied TMF guideline 3.0
21 * OpenAPI spec version: 0.1.1_inProgress
24 * NOTE: This class is auto generated by the swagger code generator program.
25 * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
27 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
28 * in compliance with the License. You may obtain a copy of the License at
30 * http://www.apache.org/licenses/LICENSE-2.0
32 * Unless required by applicable law or agreed to in writing, software distributed under the License
33 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
34 * or implied. See the License for the specific language governing permissions and limitations under
39 package org.onap.nbi.apis.serviceorder.model;
41 import com.fasterxml.jackson.annotation.JsonProperty;
42 import io.swagger.annotations.ApiModel;
43 import io.swagger.annotations.ApiModelProperty;
44 import javax.validation.constraints.NotNull;
45 import java.util.ArrayList;
46 import java.util.List;
47 import java.util.Objects;
50 * Service attributes description (these are as per the Service ODE model as used in the Service
51 * Inventory specification)
54 description = "Service attributes description (these are as per the Service ODE model as used in the Service Inventory specification)")
55 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
56 date = "2018-02-19T14:00:30.767Z")
57 public class Service {
59 private String id = null;
62 private String href = null;
65 private String name = null;
67 @JsonProperty("serviceState")
68 private String serviceState = null;
70 @JsonProperty("@type")
71 private String type = null;
73 @JsonProperty("@schemaLocation")
74 private String schemaLocation = null;
76 @JsonProperty("serviceCharacteristic")
77 private List<ServiceCharacteristic> serviceCharacteristic = null;
79 @JsonProperty("serviceRelationship")
80 private List<ServiceRelationship> serviceRelationship = null;
82 @JsonProperty("relatedParty")
83 private List<RelatedParty> relatedParty = null;
85 @JsonProperty("serviceSpecification")
86 private ServiceSpecificationRef serviceSpecification = null;
88 public Service id(String id) {
94 * Identifier of a service instance
99 @ApiModelProperty(required = true, value = "Identifier of a service instance")
100 public String getId() {
104 public void setId(String id) {
108 public Service href(String href) {
114 * Reference to the owned Service (useful for delete or modify command)
118 @JsonProperty("href")
119 @ApiModelProperty(value = "Reference to the owned Service (useful for delete or modify command)")
120 public String getHref() {
124 public void setHref(String href) {
128 public Service name(String name) {
134 * Name of the service
138 @JsonProperty("name")
139 @ApiModelProperty(value = "Name of the service")
140 public String getName() {
144 public void setName(String name) {
148 public Service serviceState(String serviceState) {
149 this.serviceState = serviceState;
154 * The lifecycle state of the service
156 * @return serviceState
158 @JsonProperty("serviceState")
159 @ApiModelProperty(value = "The lifecycle state of the service")
160 public String getServiceState() {
164 public void setServiceState(String serviceState) {
165 this.serviceState = serviceState;
168 public Service type(String type) {
176 @JsonProperty("@type")
177 @ApiModelProperty(value = "")
178 public String getType() {
182 public void setType(String type) {
186 public Service schemaLocation(String schemaLocation) {
187 this.schemaLocation = schemaLocation;
192 * @return schemaLocation
194 @JsonProperty("@schemaLocation")
195 @ApiModelProperty(value = "")
196 public String getSchemaLocation() {
197 return schemaLocation;
200 public void setSchemaLocation(String schemaLocation) {
201 this.schemaLocation = schemaLocation;
204 public Service serviceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
205 this.serviceCharacteristic = serviceCharacteristic;
209 public Service addServiceCharacteristicItem(ServiceCharacteristic serviceCharacteristicItem) {
210 if (this.serviceCharacteristic == null) {
211 this.serviceCharacteristic = new ArrayList<ServiceCharacteristic>();
213 this.serviceCharacteristic.add(serviceCharacteristicItem);
218 * A list of service characteristics .A name/value pair list used to store instance specific
219 * values of attributes. The behavior is equivalent to a MAP data structure where only one entry
220 * for any given value of \"name\" can exist
222 * @return serviceCharacteristic
224 @JsonProperty("serviceCharacteristic")
226 value = "A list of service characteristics .A name/value pair list used to store instance specific values of attributes. The behavior is equivalent to a MAP data structure where only one entry for any given value of \"name\" can exist")
227 public List<ServiceCharacteristic> getServiceCharacteristic() {
228 return serviceCharacteristic;
231 public void setServiceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
232 this.serviceCharacteristic = serviceCharacteristic;
235 public Service serviceRelationship(List<ServiceRelationship> serviceRelationship) {
236 this.serviceRelationship = serviceRelationship;
240 public Service addServiceRelationshipItem(ServiceRelationship serviceRelationshipItem) {
241 if (this.serviceRelationship == null) {
242 this.serviceRelationship = new ArrayList<ServiceRelationship>();
244 this.serviceRelationship.add(serviceRelationshipItem);
249 * A list or service relationships (ServiceRelationship[*]). Linked Services to the one
250 * instantiate, it can be : “reliesOn” if the Service needs another already owned Service to
251 * rely on (e.g. an option on an already owned mobile access Service) or “targets” or
252 * “isTargeted” (depending on the way of expressing the link) for any other kind of links that
255 * @return serviceRelationship
257 @JsonProperty("serviceRelationship")
259 value = "A list or service relationships (ServiceRelationship[*]). Linked Services to the one instantiate, it can be : “reliesOn” if the Service needs another already owned Service to rely on (e.g. an option on an already owned mobile access Service) or “targets” or “isTargeted” (depending on the way of expressing the link) for any other kind of links that may be useful")
260 public List<ServiceRelationship> getServiceRelationship() {
261 return serviceRelationship;
264 public void setServiceRelationship(List<ServiceRelationship> serviceRelationship) {
265 this.serviceRelationship = serviceRelationship;
268 public Service relatedParty(List<RelatedParty> relatedParty) {
269 this.relatedParty = relatedParty;
273 public Service addRelatedPartyItem(RelatedParty relatedPartyItem) {
274 if (this.relatedParty == null) {
275 this.relatedParty = new ArrayList<RelatedParty>();
277 this.relatedParty.add(relatedPartyItem);
282 * A list of related party parties linked at the Service level (it may be a User for example)
284 * @return relatedParty
286 @JsonProperty("relatedParty")
288 value = "A list of related party parties linked at the Service level (it may be a User for example)")
289 public List<RelatedParty> getRelatedParty() {
293 public void setRelatedParty(List<RelatedParty> relatedParty) {
294 this.relatedParty = relatedParty;
297 public Service serviceSpecification(ServiceSpecificationRef serviceSpecification) {
298 this.serviceSpecification = serviceSpecification;
303 * @return serviceSpecification
305 @JsonProperty("serviceSpecification")
306 @ApiModelProperty(value = "")
308 public ServiceSpecificationRef getServiceSpecification() {
309 return serviceSpecification;
312 public void setServiceSpecification(ServiceSpecificationRef serviceSpecification) {
313 this.serviceSpecification = serviceSpecification;
318 public boolean equals(java.lang.Object o) {
322 if (o == null || getClass() != o.getClass()) {
325 Service service = (Service) o;
326 return Objects.equals(this.id, service.id) && Objects.equals(this.href, service.href)
327 && Objects.equals(this.name, service.name) && Objects.equals(this.serviceState, service.serviceState)
328 && Objects.equals(this.type, service.type)
329 && Objects.equals(this.schemaLocation, service.schemaLocation)
330 && Objects.equals(this.serviceCharacteristic, service.serviceCharacteristic)
331 && Objects.equals(this.serviceRelationship, service.serviceRelationship)
332 && Objects.equals(this.relatedParty, service.relatedParty)
333 && Objects.equals(this.serviceSpecification, service.serviceSpecification);
337 public int hashCode() {
338 return Objects.hash(id, href, name, serviceState, type, schemaLocation, serviceCharacteristic,
339 serviceRelationship, relatedParty, serviceSpecification);
344 public String toString() {
345 StringBuilder sb = new StringBuilder();
346 sb.append("class Service {\n");
348 sb.append(" id: ").append(toIndentedString(id)).append("\n");
349 sb.append(" href: ").append(toIndentedString(href)).append("\n");
350 sb.append(" name: ").append(toIndentedString(name)).append("\n");
351 sb.append(" serviceState: ").append(toIndentedString(serviceState)).append("\n");
352 sb.append(" type: ").append(toIndentedString(type)).append("\n");
353 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
354 sb.append(" serviceCharacteristic: ").append(toIndentedString(serviceCharacteristic)).append("\n");
355 sb.append(" serviceRelationship: ").append(toIndentedString(serviceRelationship)).append("\n");
356 sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n");
357 sb.append(" serviceSpecification: ").append(toIndentedString(serviceSpecification)).append("\n");
359 return sb.toString();
363 * Convert the given object to string with each line indented by 4 spaces (except the first
366 private String toIndentedString(java.lang.Object o) {
370 return o.toString().replace("\n", "\n ");