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 java.util.ArrayList;
26 import java.util.Date;
27 import java.util.List;
28 import java.util.Objects;
29 import org.hibernate.validator.constraints.NotEmpty;
30 import org.onap.nbi.apis.serviceorder.serviceordervalidator.ValidServiceOrder;
31 import org.onap.nbi.commons.Resource;
32 import org.springframework.data.annotation.Id;
33 import org.springframework.data.mongodb.core.mapping.Document;
34 import com.fasterxml.jackson.annotation.JsonFormat;
35 import com.fasterxml.jackson.annotation.JsonProperty;
36 import io.swagger.annotations.ApiModel;
37 import io.swagger.annotations.ApiModelProperty;
40 * A Service Order is a type of order which can be used to place an order between a customer and a
41 * service provider or between a service provider and a partner and vice versa
44 description = "A Service Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa")
45 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
46 date = "2018-02-19T14:00:30.767Z")
49 public class ServiceOrder implements Resource {
53 private String id = null;
56 private String href = null;
58 @JsonProperty("externalId")
59 private String externalId = null;
61 @JsonProperty("priority")
62 private String priority = null;
64 @JsonProperty("description")
65 private String description = null;
67 @JsonProperty("category")
68 private String category = null;
70 @JsonProperty("state")
71 private StateType state = null;
73 @JsonProperty("orderDate")
74 private Date orderDate = null;
76 @JsonProperty("completionDateTime")
77 private Date completionDateTime = null;
79 @JsonProperty("expectedCompletionDate")
80 private Date expectedCompletionDate = null;
82 @JsonProperty("requestedStartDate")
83 private Date requestedStartDate = null;
85 @JsonProperty("requestedCompletionDate")
86 private Date requestedCompletionDate = null;
88 @JsonProperty("startDate")
89 private Date startDate = null;
91 @JsonProperty("@baseType")
92 private String baseType = null;
94 @JsonProperty("@type")
95 private String type = null;
97 @JsonProperty("@schemaLocation")
98 private String schemaLocation = null;
100 @JsonProperty("relatedParty")
101 private List<RelatedParty> relatedParty = null;
103 @JsonProperty("orderRelationship")
104 private List<OrderRelationship> orderRelationship = null;
106 @JsonProperty("orderItem")
107 private List<ServiceOrderItem> orderItem = null;
109 public ServiceOrder id(String id) {
116 * ID created on repository side
122 @ApiModelProperty(required = true, value = "ID created on repository side")
123 public String getId() {
127 public void setId(String id) {
131 public ServiceOrder href(String href) {
137 * Hyperlink to access the order
141 @JsonProperty("href")
142 @ApiModelProperty(value = "Hyperlink to access the order")
143 public String getHref() {
147 public void setHref(String href) {
151 public ServiceOrder externalId(String externalId) {
152 this.externalId = externalId;
157 * ID given by the consumer and only understandable by him (to facilitate his searches)
161 @JsonProperty("externalId")
162 @ApiModelProperty(value = "ID given by the consumer and only understandable by him (to facilitate his searches)")
163 public String getExternalId() {
167 public void setExternalId(String externalId) {
168 this.externalId = externalId;
171 public ServiceOrder priority(String priority) {
172 this.priority = priority;
177 * A way that can be used by consumers to prioritize orders in Service Order Management system
178 * (from 0 to 4 : 0 is the highest priority, and 4 the lowest)
182 @JsonProperty("priority")
184 value = "A way that can be used by consumers to prioritize orders in Service Order Management system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)")
185 public String getPriority() {
189 public void setPriority(String priority) {
190 this.priority = priority;
193 public ServiceOrder description(String description) {
194 this.description = description;
199 * A free-text description of the service order
201 * @return description
203 @JsonProperty("description")
204 @ApiModelProperty(value = "A free-text description of the service order")
205 public String getDescription() {
209 public void setDescription(String description) {
210 this.description = description;
213 public ServiceOrder category(String category) {
214 this.category = category;
219 * Used to categorize the order that can be useful for the OM system (e.g. “broadband”,
224 @JsonProperty("category")
226 value = "Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)")
227 public String getCategory() {
231 public void setCategory(String category) {
232 this.category = category;
235 public ServiceOrder state(StateType state) {
241 * State of the order : described in the state-machine diagram
245 @JsonProperty("state")
246 @ApiModelProperty(value = "State of the order : described in the state-machine diagram")
247 public StateType getState() {
251 public void setState(StateType state) {
255 public ServiceOrder orderDate(Date orderDate) {
256 this.orderDate = orderDate;
263 @JsonProperty("orderDate")
264 @ApiModelProperty(value = "")
265 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
266 public Date getOrderDate() {
270 public void setOrderDate(Date orderDate) {
271 this.orderDate = orderDate;
274 public ServiceOrder completionDateTime(Date completionDateTime) {
275 this.completionDateTime = completionDateTime;
280 * Date when the order was completed
282 * @return completionDateTime
284 @JsonProperty("completionDateTime")
285 @ApiModelProperty(value = "Date when the order was completed")
286 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
287 public Date getCompletionDateTime() {
288 return completionDateTime;
291 public void setCompletionDateTime(Date completionDateTime) {
292 this.completionDateTime = completionDateTime;
297 * @return expectedCompletionDate
299 @JsonProperty("expectedCompletionDate")
300 @ApiModelProperty(value = "")
301 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
302 public Date getExpectedCompletionDate() {
303 return expectedCompletionDate;
306 public void setExpectedCompletionDate(Date expectedCompletionDate) {
307 this.expectedCompletionDate = expectedCompletionDate;
310 public ServiceOrder requestedStartDate(Date requestedStartDate) {
311 this.requestedStartDate = requestedStartDate;
316 * Order start date wished by the requestor
318 * @return requestedStartDate
320 @JsonProperty("requestedStartDate")
321 @ApiModelProperty(value = "Order start date wished by the requestor")
322 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
323 public Date getRequestedStartDate() {
324 return requestedStartDate;
327 public void setRequestedStartDate(Date requestedStartDate) {
328 this.requestedStartDate = requestedStartDate;
331 public ServiceOrder requestedCompletionDate(Date requestedCompletionDate) {
332 this.requestedCompletionDate = requestedCompletionDate;
337 * Requested delivery date from the requestor perspective
339 * @return requestedCompletionDate
341 @JsonProperty("requestedCompletionDate")
342 @ApiModelProperty(value = "Requested delivery date from the requestor perspective")
343 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
344 public Date getRequestedCompletionDate() {
345 return requestedCompletionDate;
348 public void setRequestedCompletionDate(Date requestedCompletionDate) {
349 this.requestedCompletionDate = requestedCompletionDate;
352 public ServiceOrder startDate(Date startDate) {
353 this.startDate = startDate;
358 * Date when the order was started for processing
362 @JsonProperty("startDate")
363 @ApiModelProperty(value = "Date when the order was started for processing")
364 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
365 public Date getStartDate() {
369 public void setStartDate(Date startDate) {
370 this.startDate = startDate;
373 public ServiceOrder baseType(String baseType) {
374 this.baseType = baseType;
381 @JsonProperty("@baseType")
382 @ApiModelProperty(value = "")
383 public String getBaseType() {
387 public void setBaseType(String baseType) {
388 this.baseType = baseType;
391 public ServiceOrder type(String type) {
399 @JsonProperty("@type")
400 @ApiModelProperty(value = "")
401 public String getType() {
405 public void setType(String type) {
409 public ServiceOrder schemaLocation(String schemaLocation) {
410 this.schemaLocation = schemaLocation;
415 * @return schemaLocation
417 @JsonProperty("@schemaLocation")
418 @ApiModelProperty(value = "")
419 public String getSchemaLocation() {
420 return schemaLocation;
423 public void setSchemaLocation(String schemaLocation) {
424 this.schemaLocation = schemaLocation;
427 public ServiceOrder relatedParty(List<RelatedParty> relatedParty) {
428 this.relatedParty = relatedParty;
432 public ServiceOrder addRelatedPartyItem(RelatedParty relatedPartyItem) {
433 if (this.relatedParty == null) {
434 this.relatedParty = new ArrayList<RelatedParty>();
436 this.relatedParty.add(relatedPartyItem);
441 * A list of related parties which are involved in this order and the role they are playing.
443 * @return relatedParty
445 @JsonProperty("relatedParty")
447 value = "A list of related parties which are involved in this order and the role they are playing.")
448 public List<RelatedParty> getRelatedParty() {
452 public void setRelatedParty(List<RelatedParty> relatedParty) {
453 this.relatedParty = relatedParty;
456 public ServiceOrder orderRelationship(List<OrderRelationship> orderRelationship) {
457 this.orderRelationship = orderRelationship;
461 public ServiceOrder addOrderRelationshipItem(OrderRelationship orderRelationshipItem) {
462 if (this.orderRelationship == null) {
463 this.orderRelationship = new ArrayList<OrderRelationship>();
465 this.orderRelationship.add(orderRelationshipItem);
470 * A list of related order references .Linked order to the one containing this attribute
472 * @return orderRelationship
474 @JsonProperty("orderRelationship")
475 @ApiModelProperty(value = "A list of related order references .Linked order to the one containing this attribute")
476 public List<OrderRelationship> getOrderRelationship() {
477 return orderRelationship;
480 public void setOrderRelationship(List<OrderRelationship> orderRelationship) {
481 this.orderRelationship = orderRelationship;
484 public ServiceOrder orderItem(List<ServiceOrderItem> orderItem) {
485 this.orderItem = orderItem;
489 public ServiceOrder addOrderItemItem(ServiceOrderItem orderItemItem) {
490 if (this.orderItem == null) {
491 this.orderItem = new ArrayList<ServiceOrderItem>();
493 this.orderItem.add(orderItemItem);
498 * A list of order items that have to be processed.
502 @JsonProperty("orderItem")
503 @ApiModelProperty(value = "A list of order items that have to be processed.")
505 public List<ServiceOrderItem> getOrderItem() {
509 public void setOrderItem(List<ServiceOrderItem> orderItem) {
510 this.orderItem = orderItem;
515 public boolean equals(java.lang.Object o) {
519 if (o == null || getClass() != o.getClass()) {
522 ServiceOrder serviceOrder = (ServiceOrder) o;
523 return Objects.equals(this.id, serviceOrder.id) && Objects.equals(this.href, serviceOrder.href)
524 && Objects.equals(this.externalId, serviceOrder.externalId)
525 && Objects.equals(this.priority, serviceOrder.priority)
526 && Objects.equals(this.description, serviceOrder.description)
527 && Objects.equals(this.category, serviceOrder.category)
528 && Objects.equals(this.state, serviceOrder.state)
529 && Objects.equals(this.orderDate, serviceOrder.orderDate)
530 && Objects.equals(this.completionDateTime, serviceOrder.completionDateTime)
531 && Objects.equals(this.expectedCompletionDate, serviceOrder.expectedCompletionDate)
532 && Objects.equals(this.requestedStartDate, serviceOrder.requestedStartDate)
533 && Objects.equals(this.requestedCompletionDate, serviceOrder.requestedCompletionDate)
534 && Objects.equals(this.startDate, serviceOrder.startDate)
535 && Objects.equals(this.baseType, serviceOrder.baseType) && Objects.equals(this.type, serviceOrder.type)
536 && Objects.equals(this.schemaLocation, serviceOrder.schemaLocation)
537 && Objects.equals(this.relatedParty, serviceOrder.relatedParty)
538 && Objects.equals(this.orderRelationship, serviceOrder.orderRelationship)
539 && Objects.equals(this.orderItem, serviceOrder.orderItem);
543 public int hashCode() {
544 return Objects.hash(id, href, externalId, priority, description, category, state, orderDate, completionDateTime,
545 expectedCompletionDate, requestedStartDate, requestedCompletionDate, startDate, baseType, type,
546 schemaLocation, relatedParty, orderRelationship, orderItem);
551 public String toString() {
552 StringBuilder sb = new StringBuilder();
553 sb.append("class ServiceOrder {\n");
555 sb.append(" id: ").append(toIndentedString(id)).append("\n");
556 sb.append(" href: ").append(toIndentedString(href)).append("\n");
557 sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
558 sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
559 sb.append(" description: ").append(toIndentedString(description)).append("\n");
560 sb.append(" category: ").append(toIndentedString(category)).append("\n");
561 sb.append(" state: ").append(toIndentedString(state)).append("\n");
562 sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n");
563 sb.append(" completionDateTime: ").append(toIndentedString(completionDateTime)).append("\n");
564 sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)).append("\n");
565 sb.append(" requestedStartDate: ").append(toIndentedString(requestedStartDate)).append("\n");
566 sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)).append("\n");
567 sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
568 sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n");
569 sb.append(" type: ").append(toIndentedString(type)).append("\n");
570 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
571 sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n");
572 sb.append(" orderRelationship: ").append(toIndentedString(orderRelationship)).append("\n");
573 sb.append(" orderItem: ").append(toIndentedString(orderItem)).append("\n");
575 return sb.toString();
579 * Convert the given object to string with each line indented by 4 spaces (except the first
582 private String toIndentedString(java.lang.Object o) {
586 return o.toString().replace("\n", "\n ");