Add serviceOrder rest services
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / ServiceRelationship.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 Services to the one instantiate
33  */
34 @ApiModel(description = "Linked Services to the one instantiate")
35 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
36         date = "2018-02-19T14:00:30.767Z")
37 public class ServiceRelationship {
38     @JsonProperty("type")
39     private RelationshipType type = null;
40
41     @JsonProperty("service")
42     private Service service = null;
43
44     public ServiceRelationship type(RelationshipType type) {
45         this.type = type;
46         return this;
47     }
48
49     /**
50      * Relationship type. It can be : “reliesOn” if the Service needs another already owned Service
51      * to rely on (e.g. an option on an already owned mobile access Service) or “targets” or
52      * “isTargeted” (depending on the way of expressing the link) for any other kind of links that
53      * may be useful
54      *
55      * @return type
56      **/
57     @JsonProperty("type")
58     @ApiModelProperty(required = true,
59             value = "Relationship type. 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")
60     @NotNull
61     public RelationshipType getType() {
62         return type;
63     }
64
65     public void setType(RelationshipType type) {
66         this.type = type;
67     }
68
69     public ServiceRelationship service(Service service) {
70         this.service = service;
71         return this;
72     }
73
74     /**
75      * Service reference
76      *
77      * @return service
78      **/
79     @JsonProperty("service")
80     @ApiModelProperty(required = true, value = "Service reference")
81     @NotNull
82     public Service getService() {
83         return service;
84     }
85
86     public void setService(Service service) {
87         this.service = service;
88     }
89
90
91     @Override
92     public boolean equals(java.lang.Object o) {
93         if (this == o) {
94             return true;
95         }
96         if (o == null || getClass() != o.getClass()) {
97             return false;
98         }
99         ServiceRelationship serviceRelationship = (ServiceRelationship) o;
100         return Objects.equals(this.type, serviceRelationship.type)
101                 && Objects.equals(this.service, serviceRelationship.service);
102     }
103
104     @Override
105     public int hashCode() {
106         return Objects.hash(type, service);
107     }
108
109
110     @Override
111     public String toString() {
112         StringBuilder sb = new StringBuilder();
113         sb.append("class ServiceRelationship {\n");
114
115         sb.append("    type: ").append(toIndentedString(type)).append("\n");
116         sb.append("    service: ").append(toIndentedString(service)).append("\n");
117         sb.append("}");
118         return sb.toString();
119     }
120
121     /**
122      * Convert the given object to string with each line indented by 4 spaces (except the first
123      * line).
124      */
125     private String toIndentedString(java.lang.Object o) {
126         if (o == null) {
127             return "null";
128         }
129         return o.toString().replace("\n", "\n    ");
130     }
131 }
132