Add serviceOrder rest services
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / OrderItemRelationship.java
1 /*
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
4  *
5  * OpenAPI spec version: 0.1.1_inProgress
6  * 
7  *
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.
10  *
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
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
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
19  * the License.
20  */
21
22
23 package org.onap.nbi.apis.serviceorder.model;
24
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.Objects;
30
31 /**
32  * Linked order item to the one containing this attribute
33  */
34 @ApiModel(description = "Linked order item to the one containing this attribute")
35 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
36         date = "2018-02-19T14:00:30.767Z")
37 public class OrderItemRelationship {
38     @JsonProperty("type")
39     private RelationshipType type = null;
40
41     @JsonProperty("id")
42     private String id = null;
43
44     public OrderItemRelationship type(RelationshipType type) {
45         this.type = type;
46         return this;
47     }
48
49     /**
50      * The type of related order item, can be : dependancy if the order item needs to be “not
51      * started” until another order item is complete
52      *
53      * @return type
54      **/
55     @JsonProperty("type")
56     @ApiModelProperty(required = true,
57             value = "The type of related order item, can be : dependancy if the order item needs to be “not started” until another order item is complete")
58     @NotNull
59     public RelationshipType getType() {
60         return type;
61     }
62
63     public void setType(RelationshipType type) {
64         this.type = type;
65     }
66
67     public OrderItemRelationship id(String id) {
68         this.id = id;
69         return this;
70     }
71
72     /**
73      * Unique identifier of an order item
74      *
75      * @return id
76      **/
77     @JsonProperty("id")
78     @ApiModelProperty(required = true, value = "Unique identifier of an order item")
79     @NotNull
80     public String getId() {
81         return id;
82     }
83
84     public void setId(String id) {
85         this.id = id;
86     }
87
88
89     @Override
90     public boolean equals(java.lang.Object o) {
91         if (this == o) {
92             return true;
93         }
94         if (o == null || getClass() != o.getClass()) {
95             return false;
96         }
97         OrderItemRelationship orderItemRelationship = (OrderItemRelationship) o;
98         return Objects.equals(this.type, orderItemRelationship.type)
99                 && Objects.equals(this.id, orderItemRelationship.id);
100     }
101
102     @Override
103     public int hashCode() {
104         return Objects.hash(type, id);
105     }
106
107
108     @Override
109     public String toString() {
110         StringBuilder sb = new StringBuilder();
111         sb.append("class OrderItemRelationship {\n");
112
113         sb.append("    type: ").append(toIndentedString(type)).append("\n");
114         sb.append("    id: ").append(toIndentedString(id)).append("\n");
115         sb.append("}");
116         return sb.toString();
117     }
118
119     /**
120      * Convert the given object to string with each line indented by 4 spaces (except the first
121      * line).
122      */
123     private String toIndentedString(java.lang.Object o) {
124         if (o == null) {
125             return "null";
126         }
127         return o.toString().replace("\n", "\n    ");
128     }
129 }
130