2 * Copyright (c) 2018 Orange
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
18 * open API16.5 + applied TMF guideline 3.0
20 * OpenAPI spec version: 0.1.1_inProgress
23 * NOTE: This class is auto generated by the swagger code generator program.
24 * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
26 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
27 * in compliance with the License. You may obtain a copy of the License at
29 * http://www.apache.org/licenses/LICENSE-2.0
31 * Unless required by applicable law or agreed to in writing, software distributed under the License
32 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
33 * or implied. See the License for the specific language governing permissions and limitations under
38 package org.onap.nbi.apis.serviceorder.model;
40 import com.fasterxml.jackson.annotation.JsonIgnore;
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 * An identified part of the order. A service order is decomposed into one or more order items.
52 @ApiModel(description = "An identified part of the order. A service order is decomposed into one or more order items.")
53 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
54 date = "2018-02-19T14:00:30.767Z")
55 public class ServiceOrderItem {
57 private String id = null;
59 @JsonProperty("action")
60 private ActionType action = null;
62 @JsonProperty("state")
63 private StateType state = null;
65 @JsonProperty("@type")
66 private String type = null;
68 @JsonProperty("@schemaLocation")
69 private String schemaLocation = null;
71 @JsonProperty("@baseType")
72 private String baseType = null;
75 private String requestId;
77 @JsonProperty("orderItemRelationship")
78 private List<OrderItemRelationship> orderItemRelationship = new ArrayList<>();
80 @JsonProperty("service")
81 private Service service = null;
83 public ServiceOrderItem id(String id) {
89 * Identifier of the line item (generally it is a sequence number 01, 02, 03, …)
94 @ApiModelProperty(required = true,
95 value = "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)")
97 public String getId() {
101 public void setId(String id) {
105 public ServiceOrderItem action(ActionType action) {
106 this.action = action;
111 * The action to be carried out on the Service. Can be add, modify, delete, noChange
115 @JsonProperty("action")
116 @ApiModelProperty(value = "The action to be carried out on the Service. Can be add, modify, delete, noChange")
117 public ActionType getAction() {
121 public void setAction(ActionType action) {
122 this.action = action;
125 public ServiceOrderItem state(StateType state) {
131 * State of the order item (described in the state machine diagram)
135 @JsonProperty("state")
136 @ApiModelProperty(value = "State of the order item (described in the state machine diagram)")
137 public StateType getState() {
141 public void setState(StateType state) {
145 public ServiceOrderItem type(String type) {
154 @JsonProperty("@type")
155 @ApiModelProperty(value = "")
156 public String getType() {
160 public void setType(String type) {
164 public ServiceOrderItem schemaLocation(String schemaLocation) {
165 this.schemaLocation = schemaLocation;
171 * @return schemaLocation
173 @JsonProperty("@schemaLocation")
174 @ApiModelProperty(value = "")
175 public String getSchemaLocation() {
176 return schemaLocation;
179 public void setSchemaLocation(String schemaLocation) {
180 this.schemaLocation = schemaLocation;
183 public ServiceOrderItem baseType(String baseType) {
184 this.baseType = baseType;
192 @JsonProperty("@baseType")
193 @ApiModelProperty(value = "")
194 public String getBaseType() {
198 public void setBaseType(String baseType) {
199 this.baseType = baseType;
202 public ServiceOrderItem orderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
203 this.orderItemRelationship = orderItemRelationship;
207 public ServiceOrderItem addOrderItemRelationshipItem(OrderItemRelationship orderItemRelationshipItem) {
208 if (this.orderItemRelationship == null) {
209 this.orderItemRelationship = new ArrayList<OrderItemRelationship>();
211 this.orderItemRelationship.add(orderItemRelationshipItem);
216 * Linked order item to the one containing this attribute
218 * @return orderItemRelationship
220 @JsonProperty("orderItemRelationship")
221 @ApiModelProperty(value = "Linked order item to the one containing this attribute")
222 public List<OrderItemRelationship> getOrderItemRelationship() {
223 return orderItemRelationship;
226 public void setOrderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
227 this.orderItemRelationship = orderItemRelationship;
230 public ServiceOrderItem service(Service service) {
231 this.service = service;
236 * The Service to be acted on by the order item
240 @JsonProperty("service")
241 @ApiModelProperty(required = true, value = "The Service to be acted on by the order item")
243 public Service getService() {
247 public void setService(Service service) {
248 this.service = service;
252 public String getRequestId() {
256 public void setRequestId(String requestId) {
257 this.requestId = requestId;
261 public boolean equals(java.lang.Object o) {
265 if (o == null || getClass() != o.getClass()) {
268 ServiceOrderItem serviceOrderItem = (ServiceOrderItem) o;
269 return Objects.equals(this.id, serviceOrderItem.id) && Objects.equals(this.action, serviceOrderItem.action)
270 && Objects.equals(this.state, serviceOrderItem.state)
271 && Objects.equals(this.type, serviceOrderItem.type)
272 && Objects.equals(this.schemaLocation, serviceOrderItem.schemaLocation)
273 && Objects.equals(this.baseType, serviceOrderItem.baseType)
274 && Objects.equals(this.orderItemRelationship, serviceOrderItem.orderItemRelationship)
275 && Objects.equals(this.service, serviceOrderItem.service)
276 && Objects.equals(this.requestId, serviceOrderItem.requestId);
280 public int hashCode() {
281 return Objects.hash(id, action, state, type, schemaLocation, baseType, orderItemRelationship, service,
287 public String toString() {
288 StringBuilder sb = new StringBuilder();
289 sb.append("class ServiceOrderItem {\n");
291 sb.append(" id: ").append(toIndentedString(id)).append("\n");
292 sb.append(" action: ").append(toIndentedString(action)).append("\n");
293 sb.append(" state: ").append(toIndentedString(state)).append("\n");
294 sb.append(" type: ").append(toIndentedString(type)).append("\n");
295 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
296 sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n");
297 sb.append(" orderItemRelationship: ").append(toIndentedString(orderItemRelationship)).append("\n");
298 sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
299 sb.append(" service: ").append(toIndentedString(service)).append("\n");
301 return sb.toString();
305 * Convert the given object to string with each line indented by 4 spaces (except the first
308 private String toIndentedString(java.lang.Object o) {
312 return o.toString().replace("\n", "\n ");