Add serviceOrder rest services
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / Service.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.ArrayList;
30 import java.util.List;
31 import java.util.Objects;
32
33 /**
34  * Service attributes description (these are as per the Service ODE model as used in the Service
35  * Inventory specification)
36  */
37 @ApiModel(
38         description = "Service attributes description (these are as per the Service ODE model as used in the Service Inventory specification)")
39 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
40         date = "2018-02-19T14:00:30.767Z")
41 public class Service {
42     @JsonProperty("id")
43     private String id = null;
44
45     @JsonProperty("href")
46     private String href = null;
47
48     @JsonProperty("name")
49     private String name = null;
50
51     @JsonProperty("serviceState")
52     private String serviceState = null;
53
54     @JsonProperty("@type")
55     private String type = null;
56
57     @JsonProperty("@schemaLocation")
58     private String schemaLocation = null;
59
60     @JsonProperty("serviceCharacteristic")
61     private List<ServiceCharacteristic> serviceCharacteristic = null;
62
63     @JsonProperty("serviceRelationship")
64     private List<ServiceRelationship> serviceRelationship = null;
65
66     @JsonProperty("relatedParty")
67     private List<RelatedParty> relatedParty = null;
68
69     @JsonProperty("serviceSpecification")
70     private ServiceSpecificationRef serviceSpecification = null;
71
72     public Service id(String id) {
73         this.id = id;
74         return this;
75     }
76
77     /**
78      * Identifier of a service instance
79      *
80      * @return id
81      **/
82     @JsonProperty("id")
83     @ApiModelProperty(required = true, value = "Identifier of a service instance")
84     public String getId() {
85         return id;
86     }
87
88     public void setId(String id) {
89         this.id = id;
90     }
91
92     public Service href(String href) {
93         this.href = href;
94         return this;
95     }
96
97     /**
98      * Reference to the owned Service (useful for delete or modify command)
99      *
100      * @return href
101      **/
102     @JsonProperty("href")
103     @ApiModelProperty(value = "Reference to the owned Service (useful for delete or modify command)")
104     public String getHref() {
105         return href;
106     }
107
108     public void setHref(String href) {
109         this.href = href;
110     }
111
112     public Service name(String name) {
113         this.name = name;
114         return this;
115     }
116
117     /**
118      * Name of the service
119      *
120      * @return name
121      **/
122     @JsonProperty("name")
123     @ApiModelProperty(value = "Name of the service")
124     public String getName() {
125         return name;
126     }
127
128     public void setName(String name) {
129         this.name = name;
130     }
131
132     public Service serviceState(String serviceState) {
133         this.serviceState = serviceState;
134         return this;
135     }
136
137     /**
138      * The lifecycle state of the service
139      *
140      * @return serviceState
141      **/
142     @JsonProperty("serviceState")
143     @ApiModelProperty(value = "The lifecycle state of the service")
144     public String getServiceState() {
145         return serviceState;
146     }
147
148     public void setServiceState(String serviceState) {
149         this.serviceState = serviceState;
150     }
151
152     public Service type(String type) {
153         this.type = type;
154         return this;
155     }
156
157     /**
158      * @return type
159      **/
160     @JsonProperty("@type")
161     @ApiModelProperty(value = "")
162     public String getType() {
163         return type;
164     }
165
166     public void setType(String type) {
167         this.type = type;
168     }
169
170     public Service schemaLocation(String schemaLocation) {
171         this.schemaLocation = schemaLocation;
172         return this;
173     }
174
175     /**
176      * @return schemaLocation
177      **/
178     @JsonProperty("@schemaLocation")
179     @ApiModelProperty(value = "")
180     public String getSchemaLocation() {
181         return schemaLocation;
182     }
183
184     public void setSchemaLocation(String schemaLocation) {
185         this.schemaLocation = schemaLocation;
186     }
187
188     public Service serviceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
189         this.serviceCharacteristic = serviceCharacteristic;
190         return this;
191     }
192
193     public Service addServiceCharacteristicItem(ServiceCharacteristic serviceCharacteristicItem) {
194         if (this.serviceCharacteristic == null) {
195             this.serviceCharacteristic = new ArrayList<ServiceCharacteristic>();
196         }
197         this.serviceCharacteristic.add(serviceCharacteristicItem);
198         return this;
199     }
200
201     /**
202      * A list of service characteristics .A name/value pair list used to store instance specific
203      * values of attributes. The behavior is equivalent to a MAP data structure where only one entry
204      * for any given value of \&quot;name\&quot; can exist
205      *
206      * @return serviceCharacteristic
207      **/
208     @JsonProperty("serviceCharacteristic")
209     @ApiModelProperty(
210             value = "A list of service characteristics .A name/value pair list used to store instance specific values of attributes. The behavior is equivalent to a MAP data structure where only one entry for any given value of \"name\" can exist")
211     public List<ServiceCharacteristic> getServiceCharacteristic() {
212         return serviceCharacteristic;
213     }
214
215     public void setServiceCharacteristic(List<ServiceCharacteristic> serviceCharacteristic) {
216         this.serviceCharacteristic = serviceCharacteristic;
217     }
218
219     public Service serviceRelationship(List<ServiceRelationship> serviceRelationship) {
220         this.serviceRelationship = serviceRelationship;
221         return this;
222     }
223
224     public Service addServiceRelationshipItem(ServiceRelationship serviceRelationshipItem) {
225         if (this.serviceRelationship == null) {
226             this.serviceRelationship = new ArrayList<ServiceRelationship>();
227         }
228         this.serviceRelationship.add(serviceRelationshipItem);
229         return this;
230     }
231
232     /**
233      * A list or service relationships (ServiceRelationship[*]). Linked Services to the one
234      * instantiate, it can be : “reliesOn” if the Service needs another already owned Service to
235      * rely on (e.g. an option on an already owned mobile access Service) or “targets” or
236      * “isTargeted” (depending on the way of expressing the link) for any other kind of links that
237      * may be useful
238      *
239      * @return serviceRelationship
240      **/
241     @JsonProperty("serviceRelationship")
242     @ApiModelProperty(
243             value = "A list or service relationships (ServiceRelationship[*]). Linked Services to the one instantiate, it can be : “reliesOn” if the Service needs another already owned Service to rely on (e.g. an option on an already owned mobile access Service) or “targets” or “isTargeted” (depending on the way of expressing the link) for any other kind of links that may be useful")
244     public List<ServiceRelationship> getServiceRelationship() {
245         return serviceRelationship;
246     }
247
248     public void setServiceRelationship(List<ServiceRelationship> serviceRelationship) {
249         this.serviceRelationship = serviceRelationship;
250     }
251
252     public Service relatedParty(List<RelatedParty> relatedParty) {
253         this.relatedParty = relatedParty;
254         return this;
255     }
256
257     public Service addRelatedPartyItem(RelatedParty relatedPartyItem) {
258         if (this.relatedParty == null) {
259             this.relatedParty = new ArrayList<RelatedParty>();
260         }
261         this.relatedParty.add(relatedPartyItem);
262         return this;
263     }
264
265     /**
266      * A list of related party parties linked at the Service level (it may be a User for example)
267      *
268      * @return relatedParty
269      **/
270     @JsonProperty("relatedParty")
271     @ApiModelProperty(
272             value = "A list of related party parties linked at the Service level (it may be a User for example)")
273     public List<RelatedParty> getRelatedParty() {
274         return relatedParty;
275     }
276
277     public void setRelatedParty(List<RelatedParty> relatedParty) {
278         this.relatedParty = relatedParty;
279     }
280
281     public Service serviceSpecification(ServiceSpecificationRef serviceSpecification) {
282         this.serviceSpecification = serviceSpecification;
283         return this;
284     }
285
286     /**
287      * @return serviceSpecification
288      **/
289     @JsonProperty("serviceSpecification")
290     @ApiModelProperty(value = "")
291     @NotNull
292     public ServiceSpecificationRef getServiceSpecification() {
293         return serviceSpecification;
294     }
295
296     public void setServiceSpecification(ServiceSpecificationRef serviceSpecification) {
297         this.serviceSpecification = serviceSpecification;
298     }
299
300
301     @Override
302     public boolean equals(java.lang.Object o) {
303         if (this == o) {
304             return true;
305         }
306         if (o == null || getClass() != o.getClass()) {
307             return false;
308         }
309         Service service = (Service) o;
310         return Objects.equals(this.id, service.id) && Objects.equals(this.href, service.href)
311                 && Objects.equals(this.name, service.name) && Objects.equals(this.serviceState, service.serviceState)
312                 && Objects.equals(this.type, service.type)
313                 && Objects.equals(this.schemaLocation, service.schemaLocation)
314                 && Objects.equals(this.serviceCharacteristic, service.serviceCharacteristic)
315                 && Objects.equals(this.serviceRelationship, service.serviceRelationship)
316                 && Objects.equals(this.relatedParty, service.relatedParty)
317                 && Objects.equals(this.serviceSpecification, service.serviceSpecification);
318     }
319
320     @Override
321     public int hashCode() {
322         return Objects.hash(id, href, name, serviceState, type, schemaLocation, serviceCharacteristic,
323                 serviceRelationship, relatedParty, serviceSpecification);
324     }
325
326
327     @Override
328     public String toString() {
329         StringBuilder sb = new StringBuilder();
330         sb.append("class Service {\n");
331
332         sb.append("    id: ").append(toIndentedString(id)).append("\n");
333         sb.append("    href: ").append(toIndentedString(href)).append("\n");
334         sb.append("    name: ").append(toIndentedString(name)).append("\n");
335         sb.append("    serviceState: ").append(toIndentedString(serviceState)).append("\n");
336         sb.append("    type: ").append(toIndentedString(type)).append("\n");
337         sb.append("    schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
338         sb.append("    serviceCharacteristic: ").append(toIndentedString(serviceCharacteristic)).append("\n");
339         sb.append("    serviceRelationship: ").append(toIndentedString(serviceRelationship)).append("\n");
340         sb.append("    relatedParty: ").append(toIndentedString(relatedParty)).append("\n");
341         sb.append("    serviceSpecification: ").append(toIndentedString(serviceSpecification)).append("\n");
342         sb.append("}");
343         return sb.toString();
344     }
345
346     /**
347      * Convert the given object to string with each line indented by 4 spaces (except the first
348      * line).
349      */
350     private String toIndentedString(java.lang.Object o) {
351         if (o == null) {
352             return "null";
353         }
354         return o.toString().replace("\n", "\n    ");
355     }
356 }
357