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.JsonIgnore;
26 import com.fasterxml.jackson.annotation.JsonProperty;
27 import io.swagger.annotations.ApiModel;
28 import io.swagger.annotations.ApiModelProperty;
29 import javax.validation.constraints.NotNull;
30 import java.util.ArrayList;
31 import java.util.List;
32 import java.util.Objects;
35 * An identified part of the order. A service order is decomposed into one or more order items.
37 @ApiModel(description = "An identified part of the order. A service order is decomposed into one or more order items.")
38 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
39 date = "2018-02-19T14:00:30.767Z")
40 public class ServiceOrderItem {
42 private String id = null;
44 @JsonProperty("action")
45 private ActionType action = null;
47 @JsonProperty("state")
48 private StateType state = null;
50 @JsonProperty("@type")
51 private String type = null;
53 @JsonProperty("@schemaLocation")
54 private String schemaLocation = null;
56 @JsonProperty("@baseType")
57 private String baseType = null;
60 private String requestId;
62 @JsonProperty("orderItemRelationship")
63 private List<OrderItemRelationship> orderItemRelationship = new ArrayList<>();
65 @JsonProperty("service")
66 private Service service = null;
68 public ServiceOrderItem id(String id) {
74 * Identifier of the line item (generally it is a sequence number 01, 02, 03, …)
79 @ApiModelProperty(required = true,
80 value = "Identifier of the line item (generally it is a sequence number 01, 02, 03, …)")
82 public String getId() {
86 public void setId(String id) {
90 public ServiceOrderItem action(ActionType action) {
96 * The action to be carried out on the Service. Can be add, modify, delete, noChange
100 @JsonProperty("action")
101 @ApiModelProperty(value = "The action to be carried out on the Service. Can be add, modify, delete, noChange")
102 public ActionType getAction() {
106 public void setAction(ActionType action) {
107 this.action = action;
110 public ServiceOrderItem state(StateType state) {
116 * State of the order item (described in the state machine diagram)
120 @JsonProperty("state")
121 @ApiModelProperty(value = "State of the order item (described in the state machine diagram)")
122 public StateType getState() {
126 public void setState(StateType state) {
130 public ServiceOrderItem type(String type) {
139 @JsonProperty("@type")
140 @ApiModelProperty(value = "")
141 public String getType() {
145 public void setType(String type) {
149 public ServiceOrderItem schemaLocation(String schemaLocation) {
150 this.schemaLocation = schemaLocation;
156 * @return schemaLocation
158 @JsonProperty("@schemaLocation")
159 @ApiModelProperty(value = "")
160 public String getSchemaLocation() {
161 return schemaLocation;
164 public void setSchemaLocation(String schemaLocation) {
165 this.schemaLocation = schemaLocation;
168 public ServiceOrderItem baseType(String baseType) {
169 this.baseType = baseType;
177 @JsonProperty("@baseType")
178 @ApiModelProperty(value = "")
179 public String getBaseType() {
183 public void setBaseType(String baseType) {
184 this.baseType = baseType;
187 public ServiceOrderItem orderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
188 this.orderItemRelationship = orderItemRelationship;
192 public ServiceOrderItem addOrderItemRelationshipItem(OrderItemRelationship orderItemRelationshipItem) {
193 if (this.orderItemRelationship == null) {
194 this.orderItemRelationship = new ArrayList<OrderItemRelationship>();
196 this.orderItemRelationship.add(orderItemRelationshipItem);
201 * Linked order item to the one containing this attribute
203 * @return orderItemRelationship
205 @JsonProperty("orderItemRelationship")
206 @ApiModelProperty(value = "Linked order item to the one containing this attribute")
207 public List<OrderItemRelationship> getOrderItemRelationship() {
208 return orderItemRelationship;
211 public void setOrderItemRelationship(List<OrderItemRelationship> orderItemRelationship) {
212 this.orderItemRelationship = orderItemRelationship;
215 public ServiceOrderItem service(Service service) {
216 this.service = service;
221 * The Service to be acted on by the order item
225 @JsonProperty("service")
226 @ApiModelProperty(required = true, value = "The Service to be acted on by the order item")
228 public Service getService() {
232 public void setService(Service service) {
233 this.service = service;
237 public String getRequestId() {
241 public void setRequestId(String requestId) {
242 this.requestId = requestId;
246 public boolean equals(java.lang.Object o) {
250 if (o == null || getClass() != o.getClass()) {
253 ServiceOrderItem serviceOrderItem = (ServiceOrderItem) o;
254 return Objects.equals(this.id, serviceOrderItem.id) && Objects.equals(this.action, serviceOrderItem.action)
255 && Objects.equals(this.state, serviceOrderItem.state)
256 && Objects.equals(this.type, serviceOrderItem.type)
257 && Objects.equals(this.schemaLocation, serviceOrderItem.schemaLocation)
258 && Objects.equals(this.baseType, serviceOrderItem.baseType)
259 && Objects.equals(this.orderItemRelationship, serviceOrderItem.orderItemRelationship)
260 && Objects.equals(this.service, serviceOrderItem.service)
261 && Objects.equals(this.requestId, serviceOrderItem.requestId);
265 public int hashCode() {
266 return Objects.hash(id, action, state, type, schemaLocation, baseType, orderItemRelationship, service,
272 public String toString() {
273 StringBuilder sb = new StringBuilder();
274 sb.append("class ServiceOrderItem {\n");
276 sb.append(" id: ").append(toIndentedString(id)).append("\n");
277 sb.append(" action: ").append(toIndentedString(action)).append("\n");
278 sb.append(" state: ").append(toIndentedString(state)).append("\n");
279 sb.append(" type: ").append(toIndentedString(type)).append("\n");
280 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
281 sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n");
282 sb.append(" orderItemRelationship: ").append(toIndentedString(orderItemRelationship)).append("\n");
283 sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
284 sb.append(" service: ").append(toIndentedString(service)).append("\n");
286 return sb.toString();
290 * Convert the given object to string with each line indented by 4 spaces (except the first
293 private String toIndentedString(java.lang.Object o) {
297 return o.toString().replace("\n", "\n ");