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.JsonIgnore;
42 import com.fasterxml.jackson.annotation.JsonProperty;
43 import io.swagger.annotations.ApiModel;
44 import io.swagger.annotations.ApiModelProperty;
45 import javax.validation.constraints.NotNull;
46 import java.util.ArrayList;
47 import java.util.List;
48 import java.util.Objects;
51 * An identified part of the order. A service order is decomposed into one or more order items.
53 @ApiModel(description = "An identified part of the order. A service order is decomposed into one or more order items.")
54 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
55 date = "2018-02-19T14:00:30.767Z")
56 public class ServiceOrderItem {
58 private String id = null;
60 @JsonProperty("action")
61 private ActionType action = null;
63 @JsonProperty("state")
64 private StateType state = null;
66 @JsonProperty("@type")
67 private String type = null;
69 @JsonProperty("@schemaLocation")
70 private String schemaLocation = null;
72 @JsonProperty("@baseType")
73 private String baseType = null;
76 private String requestId;
78 @JsonProperty("orderItemRelationship")
79 private List<OrderItemRelationship> orderItemRelationship = new ArrayList<>();
81 @JsonProperty("service")
82 private Service service = null;
84 public ServiceOrderItem id(String id) {
90 * Identifier of the line item (generally it is a sequence number 01, 02, 03, …)
95 @ApiModelProperty(required = true,
96 value = "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)")
98 public String getId() {
102 public void setId(String id) {
106 public ServiceOrderItem action(ActionType action) {
107 this.action = action;
112 * The action to be carried out on the Service. Can be add, modify, delete, noChange
116 @JsonProperty("action")
117 @ApiModelProperty(value = "The action to be carried out on the Service. Can be add, modify, delete, noChange")
118 public ActionType getAction() {
122 public void setAction(ActionType action) {
123 this.action = action;
126 public ServiceOrderItem state(StateType state) {
132 * State of the order item (described in the state machine diagram)
136 @JsonProperty("state")
137 @ApiModelProperty(value = "State of the order item (described in the state machine diagram)")
138 public StateType getState() {
142 public void setState(StateType state) {
146 public ServiceOrderItem type(String type) {
155 @JsonProperty("@type")
156 @ApiModelProperty(value = "")
157 public String getType() {
161 public void setType(String type) {
165 public ServiceOrderItem schemaLocation(String schemaLocation) {
166 this.schemaLocation = schemaLocation;
172 * @return schemaLocation
174 @JsonProperty("@schemaLocation")
175 @ApiModelProperty(value = "")
176 public String getSchemaLocation() {
177 return schemaLocation;
180 public void setSchemaLocation(String schemaLocation) {
181 this.schemaLocation = schemaLocation;
184 public ServiceOrderItem baseType(String baseType) {
185 this.baseType = baseType;
193 @JsonProperty("@baseType")
194 @ApiModelProperty(value = "")
195 public String getBaseType() {
199 public void setBaseType(String baseType) {
200 this.baseType = baseType;
203 public ServiceOrderItem orderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
204 this.orderItemRelationship = orderItemRelationship;
208 public ServiceOrderItem addOrderItemRelationshipItem(OrderItemRelationship orderItemRelationshipItem) {
209 if (this.orderItemRelationship == null) {
210 this.orderItemRelationship = new ArrayList<OrderItemRelationship>();
212 this.orderItemRelationship.add(orderItemRelationshipItem);
217 * Linked order item to the one containing this attribute
219 * @return orderItemRelationship
221 @JsonProperty("orderItemRelationship")
222 @ApiModelProperty(value = "Linked order item to the one containing this attribute")
223 public List<OrderItemRelationship> getOrderItemRelationship() {
224 return orderItemRelationship;
227 public void setOrderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
228 this.orderItemRelationship = orderItemRelationship;
231 public ServiceOrderItem service(Service service) {
232 this.service = service;
237 * The Service to be acted on by the order item
241 @JsonProperty("service")
242 @ApiModelProperty(required = true, value = "The Service to be acted on by the order item")
244 public Service getService() {
248 public void setService(Service service) {
249 this.service = service;
253 public String getRequestId() {
257 public void setRequestId(String requestId) {
258 this.requestId = requestId;
262 public boolean equals(java.lang.Object o) {
266 if (o == null || getClass() != o.getClass()) {
269 ServiceOrderItem serviceOrderItem = (ServiceOrderItem) o;
270 return Objects.equals(this.id, serviceOrderItem.id) && Objects.equals(this.action, serviceOrderItem.action)
271 && Objects.equals(this.state, serviceOrderItem.state)
272 && Objects.equals(this.type, serviceOrderItem.type)
273 && Objects.equals(this.schemaLocation, serviceOrderItem.schemaLocation)
274 && Objects.equals(this.baseType, serviceOrderItem.baseType)
275 && Objects.equals(this.orderItemRelationship, serviceOrderItem.orderItemRelationship)
276 && Objects.equals(this.service, serviceOrderItem.service)
277 && Objects.equals(this.requestId, serviceOrderItem.requestId);
281 public int hashCode() {
282 return Objects.hash(id, action, state, type, schemaLocation, baseType, orderItemRelationship, service,
288 public String toString() {
289 StringBuilder sb = new StringBuilder();
290 sb.append("class ServiceOrderItem {\n");
292 sb.append(" id: ").append(toIndentedString(id)).append("\n");
293 sb.append(" action: ").append(toIndentedString(action)).append("\n");
294 sb.append(" state: ").append(toIndentedString(state)).append("\n");
295 sb.append(" type: ").append(toIndentedString(type)).append("\n");
296 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
297 sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n");
298 sb.append(" orderItemRelationship: ").append(toIndentedString(orderItemRelationship)).append("\n");
299 sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
300 sb.append(" service: ").append(toIndentedString(service)).append("\n");
302 return sb.toString();
306 * Convert the given object to string with each line indented by 4 spaces (except the first
309 private String toIndentedString(java.lang.Object o) {
313 return o.toString().replace("\n", "\n ");