2 * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
3 * open API16.5 + applied TMF guideline 3.0
5 * OpenAPI spec version: 0.1.1_inProgress
8 * NOTE: This class is auto generated by the swagger code generator program.
9 * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
11 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
12 * in compliance with the License. You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software distributed under the License
17 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
18 * or implied. See the License for the specific language governing permissions and limitations under
23 package org.onap.nbi.apis.serviceorder.model;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import io.swagger.annotations.ApiModel;
27 import io.swagger.annotations.ApiModelProperty;
28 import javax.validation.constraints.NotNull;
29 import java.util.ArrayList;
30 import java.util.List;
31 import java.util.Objects;
34 * Service attributes description (these are as per the Service ODE model as used in the Service
35 * Inventory specification)
38 description = "Service attributes description (these are as per the Service ODE model as used in the Service Inventory specification)")
39 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
40 date = "2018-02-19T14:00:30.767Z")
41 public class Service {
43 private String id = null;
46 private String href = null;
49 private String name = null;
51 @JsonProperty("serviceState")
52 private String serviceState = null;
54 @JsonProperty("@type")
55 private String type = null;
57 @JsonProperty("@schemaLocation")
58 private String schemaLocation = null;
60 @JsonProperty("serviceCharacteristic")
61 private List<ServiceCharacteristic> serviceCharacteristic = null;
63 @JsonProperty("serviceRelationship")
64 private List<ServiceRelationship> serviceRelationship = null;
66 @JsonProperty("relatedParty")
67 private List<RelatedParty> relatedParty = null;
69 @JsonProperty("serviceSpecification")
70 private ServiceSpecificationRef serviceSpecification = null;
72 public Service id(String id) {
78 * Identifier of a service instance
83 @ApiModelProperty(required = true, value = "Identifier of a service instance")
84 public String getId() {
88 public void setId(String id) {
92 public Service href(String href) {
98 * Reference to the owned Service (useful for delete or modify command)
102 @JsonProperty("href")
103 @ApiModelProperty(value = "Reference to the owned Service (useful for delete or modify command)")
104 public String getHref() {
108 public void setHref(String href) {
112 public Service name(String name) {
118 * Name of the service
122 @JsonProperty("name")
123 @ApiModelProperty(value = "Name of the service")
124 public String getName() {
128 public void setName(String name) {
132 public Service serviceState(String serviceState) {
133 this.serviceState = serviceState;
138 * The lifecycle state of the service
140 * @return serviceState
142 @JsonProperty("serviceState")
143 @ApiModelProperty(value = "The lifecycle state of the service")
144 public String getServiceState() {
148 public void setServiceState(String serviceState) {
149 this.serviceState = serviceState;
152 public Service type(String type) {
160 @JsonProperty("@type")
161 @ApiModelProperty(value = "")
162 public String getType() {
166 public void setType(String type) {
170 public Service schemaLocation(String schemaLocation) {
171 this.schemaLocation = schemaLocation;
176 * @return schemaLocation
178 @JsonProperty("@schemaLocation")
179 @ApiModelProperty(value = "")
180 public String getSchemaLocation() {
181 return schemaLocation;
184 public void setSchemaLocation(String schemaLocation) {
185 this.schemaLocation = schemaLocation;
188 public Service serviceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
189 this.serviceCharacteristic = serviceCharacteristic;
193 public Service addServiceCharacteristicItem(ServiceCharacteristic serviceCharacteristicItem) {
194 if (this.serviceCharacteristic == null) {
195 this.serviceCharacteristic = new ArrayList<ServiceCharacteristic>();
197 this.serviceCharacteristic.add(serviceCharacteristicItem);
202 * A list of service characteristics .A name/value pair list used to store instance specific
203 * values of attributes. The behavior is equivalent to a MAP data structure where only one entry
204 * for any given value of \"name\" can exist
206 * @return serviceCharacteristic
208 @JsonProperty("serviceCharacteristic")
210 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")
211 public List<ServiceCharacteristic> getServiceCharacteristic() {
212 return serviceCharacteristic;
215 public void setServiceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
216 this.serviceCharacteristic = serviceCharacteristic;
219 public Service serviceRelationship(List<ServiceRelationship> serviceRelationship) {
220 this.serviceRelationship = serviceRelationship;
224 public Service addServiceRelationshipItem(ServiceRelationship serviceRelationshipItem) {
225 if (this.serviceRelationship == null) {
226 this.serviceRelationship = new ArrayList<ServiceRelationship>();
228 this.serviceRelationship.add(serviceRelationshipItem);
233 * A list or service relationships (ServiceRelationship[*]). Linked Services to the one
234 * instantiate, it can be : “reliesOn” if the Service needs another already owned Service to
235 * rely on (e.g. an option on an already owned mobile access Service) or “targets” or
236 * “isTargeted” (depending on the way of expressing the link) for any other kind of links that
239 * @return serviceRelationship
241 @JsonProperty("serviceRelationship")
243 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")
244 public List<ServiceRelationship> getServiceRelationship() {
245 return serviceRelationship;
248 public void setServiceRelationship(List<ServiceRelationship> serviceRelationship) {
249 this.serviceRelationship = serviceRelationship;
252 public Service relatedParty(List<RelatedParty> relatedParty) {
253 this.relatedParty = relatedParty;
257 public Service addRelatedPartyItem(RelatedParty relatedPartyItem) {
258 if (this.relatedParty == null) {
259 this.relatedParty = new ArrayList<RelatedParty>();
261 this.relatedParty.add(relatedPartyItem);
266 * A list of related party parties linked at the Service level (it may be a User for example)
268 * @return relatedParty
270 @JsonProperty("relatedParty")
272 value = "A list of related party parties linked at the Service level (it may be a User for example)")
273 public List<RelatedParty> getRelatedParty() {
277 public void setRelatedParty(List<RelatedParty> relatedParty) {
278 this.relatedParty = relatedParty;
281 public Service serviceSpecification(ServiceSpecificationRef serviceSpecification) {
282 this.serviceSpecification = serviceSpecification;
287 * @return serviceSpecification
289 @JsonProperty("serviceSpecification")
290 @ApiModelProperty(value = "")
292 public ServiceSpecificationRef getServiceSpecification() {
293 return serviceSpecification;
296 public void setServiceSpecification(ServiceSpecificationRef serviceSpecification) {
297 this.serviceSpecification = serviceSpecification;
302 public boolean equals(java.lang.Object o) {
306 if (o == null || getClass() != o.getClass()) {
309 Service service = (Service) o;
310 return Objects.equals(this.id, service.id) && Objects.equals(this.href, service.href)
311 && Objects.equals(this.name, service.name) && Objects.equals(this.serviceState, service.serviceState)
312 && Objects.equals(this.type, service.type)
313 && Objects.equals(this.schemaLocation, service.schemaLocation)
314 && Objects.equals(this.serviceCharacteristic, service.serviceCharacteristic)
315 && Objects.equals(this.serviceRelationship, service.serviceRelationship)
316 && Objects.equals(this.relatedParty, service.relatedParty)
317 && Objects.equals(this.serviceSpecification, service.serviceSpecification);
321 public int hashCode() {
322 return Objects.hash(id, href, name, serviceState, type, schemaLocation, serviceCharacteristic,
323 serviceRelationship, relatedParty, serviceSpecification);
328 public String toString() {
329 StringBuilder sb = new StringBuilder();
330 sb.append("class Service {\n");
332 sb.append(" id: ").append(toIndentedString(id)).append("\n");
333 sb.append(" href: ").append(toIndentedString(href)).append("\n");
334 sb.append(" name: ").append(toIndentedString(name)).append("\n");
335 sb.append(" serviceState: ").append(toIndentedString(serviceState)).append("\n");
336 sb.append(" type: ").append(toIndentedString(type)).append("\n");
337 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
338 sb.append(" serviceCharacteristic: ").append(toIndentedString(serviceCharacteristic)).append("\n");
339 sb.append(" serviceRelationship: ").append(toIndentedString(serviceRelationship)).append("\n");
340 sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n");
341 sb.append(" serviceSpecification: ").append(toIndentedString(serviceSpecification)).append("\n");
343 return sb.toString();
347 * Convert the given object to string with each line indented by 4 spaces (except the first
350 private String toIndentedString(java.lang.Object o) {
354 return o.toString().replace("\n", "\n ");