4856d7eedd32fd2c93eab8486d5e6c654122685e
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / OrderRelationship.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 to the one containing this attribute
33  */
34 @ApiModel(description = "Linked order 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 OrderRelationship {
38     @JsonProperty("type")
39     private String type = null;
40
41     @JsonProperty("id")
42     private String id = null;
43
44     @JsonProperty("href")
45     private String href = null;
46
47     @JsonProperty("@referredType")
48     private String referredType = null;
49
50     public OrderRelationship type(String type) {
51         this.type = type;
52         return this;
53     }
54
55     /**
56      * The type of related order, can be : “dependency” if the order needs to be “not started” until
57      * another order item is complete (a service order in this case) or “cross-ref” to keep track of
58      * the source order (a productOrder)
59      *
60      * @return type
61      **/
62     @JsonProperty("type")
63     @ApiModelProperty(
64             value = "The type of related order, can be : “dependency” if the order needs to be “not started” until another order item is complete (a service order in this case) or “cross-ref” to keep track of the source order (a productOrder)")
65     public String getType() {
66         return type;
67     }
68
69     public void setType(String type) {
70         this.type = type;
71     }
72
73     public OrderRelationship id(String id) {
74         this.id = id;
75         return this;
76     }
77
78     /**
79      * The id of the related order
80      *
81      * @return id
82      **/
83     @JsonProperty("id")
84     @ApiModelProperty(required = true, value = "The id of the related order")
85     @NotNull
86     public String getId() {
87         return id;
88     }
89
90     public void setId(String id) {
91         this.id = id;
92     }
93
94     public OrderRelationship href(String href) {
95         this.href = href;
96         return this;
97     }
98
99     /**
100      * A hyperlink to the related order
101      *
102      * @return href
103      **/
104     @JsonProperty("href")
105     @ApiModelProperty(value = "A hyperlink to the related order")
106     public String getHref() {
107         return href;
108     }
109
110     public void setHref(String href) {
111         this.href = href;
112     }
113
114     public OrderRelationship referredType(String referredType) {
115         this.referredType = referredType;
116         return this;
117     }
118
119     /**
120      * @return referredType
121      **/
122     @JsonProperty("@referredType")
123     @ApiModelProperty(value = "")
124     public String getReferredType() {
125         return referredType;
126     }
127
128     public void setReferredType(String referredType) {
129         this.referredType = referredType;
130     }
131
132
133     @Override
134     public boolean equals(java.lang.Object o) {
135         if (this == o) {
136             return true;
137         }
138         if (o == null || getClass() != o.getClass()) {
139             return false;
140         }
141         OrderRelationship orderRelationship = (OrderRelationship) o;
142         return Objects.equals(this.type, orderRelationship.type) && Objects.equals(this.id, orderRelationship.id)
143                 && Objects.equals(this.href, orderRelationship.href)
144                 && Objects.equals(this.referredType, orderRelationship.referredType);
145     }
146
147     @Override
148     public int hashCode() {
149         return Objects.hash(type, id, href, referredType);
150     }
151
152
153     @Override
154     public String toString() {
155         StringBuilder sb = new StringBuilder();
156         sb.append("class OrderRelationship {\n");
157
158         sb.append("    type: ").append(toIndentedString(type)).append("\n");
159         sb.append("    id: ").append(toIndentedString(id)).append("\n");
160         sb.append("    href: ").append(toIndentedString(href)).append("\n");
161         sb.append("    referredType: ").append(toIndentedString(referredType)).append("\n");
162         sb.append("}");
163         return sb.toString();
164     }
165
166     /**
167      * Convert the given object to string with each line indented by 4 spaces (except the first
168      * line).
169      */
170     private String toIndentedString(java.lang.Object o) {
171         if (o == null) {
172             return "null";
173         }
174         return o.toString().replace("\n", "\n    ");
175     }
176 }
177