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