Adding rest service for so monitoring
[so.git] / so-monitoring / so-monitoring-handler / src / main / java / org / onap / so / montoring / camunda / model / SoActiveInfraRequests.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  * 
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  * 
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * 
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.so.montoring.camunda.model;
21
22 import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual;
23
24 import com.fasterxml.jackson.annotation.JsonIgnore;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26
27 /**
28  * @author waqas.ikram@ericsson.com
29  *
30  */
31 @JsonIgnoreProperties(ignoreUnknown = true)
32 public class SoActiveInfraRequests {
33
34     private String requestId;
35     private String serviceInstanceId;
36     private String networkId;
37     private String startTime;
38     private String endTime;
39     private String requestStatus;
40     private String serviceInstanceName;
41     private String serviceType;
42
43     /**
44      * @return the requestId
45      */
46     public String getRequestId() {
47         return requestId;
48     }
49
50     /**
51      * @param requestId the requestId to set
52      */
53     public void setRequestId(final String requestId) {
54         this.requestId = requestId;
55     }
56
57     /**
58      * @return the serviceInstanceId
59      */
60     public String getServiceInstanceId() {
61         return serviceInstanceId;
62     }
63
64     /**
65      * @param serviceInstanceId the serviceInstanceId to set
66      */
67     public void setServiceInstanceId(final String serviceInstanceId) {
68         this.serviceInstanceId = serviceInstanceId;
69     }
70
71     /**
72      * @return the networkId
73      */
74     public String getNetworkId() {
75         return networkId;
76     }
77
78     /**
79      * @param networkId the networkId to set
80      */
81     public void setNetworkId(final String networkId) {
82         this.networkId = networkId;
83     }
84
85     /**
86      * @return the startTime
87      */
88     public String getStartTime() {
89         return startTime;
90     }
91
92     /**
93      * @param startTime the startTime to set
94      */
95     public void setStartTime(final String startTime) {
96         this.startTime = startTime;
97     }
98
99     /**
100      * @return the endTime
101      */
102     public String getEndTime() {
103         return endTime;
104     }
105
106     /**
107      * @param endTime the endTime to set
108      */
109     public void setEndTime(final String endTime) {
110         this.endTime = endTime;
111     }
112
113     /**
114      * @return the requestStatus
115      */
116     public String getRequestStatus() {
117         return requestStatus;
118     }
119
120     /**
121      * @param requestStatus the requestStatus to set
122      */
123     public void setRequestStatus(final String requestStatus) {
124         this.requestStatus = requestStatus;
125     }
126
127     /**
128      * @return the serviceInstanceName
129      */
130     public String getServiceInstanceName() {
131         return serviceInstanceName;
132     }
133
134     /**
135      * @param serviceInstanceName the serviceInstanceName to set
136      */
137     public void setServiceInstanceName(final String serviceInstanceName) {
138         this.serviceInstanceName = serviceInstanceName;
139     }
140
141     /**
142      * @return the serviceType
143      */
144     public String getServiceType() {
145         return serviceType;
146     }
147
148     /**
149      * @param serviceType the serviceType to set
150      */
151     public void setServiceType(final String serviceType) {
152         this.serviceType = serviceType;
153     }
154
155     @JsonIgnore
156     @Override
157     public int hashCode() {
158         final int prime = 31;
159         int result = 1;
160         result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
161         result = prime * result + ((networkId == null) ? 0 : networkId.hashCode());
162         result = prime * result + ((requestId == null) ? 0 : requestId.hashCode());
163         result = prime * result + ((requestStatus == null) ? 0 : requestStatus.hashCode());
164         result = prime * result + ((serviceInstanceId == null) ? 0 : serviceInstanceId.hashCode());
165         result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode());
166         result = prime * result + ((serviceType == null) ? 0 : serviceType.hashCode());
167         result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
168         return result;
169     }
170
171     @JsonIgnore
172     @Override
173     public boolean equals(final Object obj) {
174         if (obj instanceof SoActiveInfraRequests) {
175             SoActiveInfraRequests other = (SoActiveInfraRequests) obj;
176             return isEqual(requestId, other.requestId) && isEqual(serviceInstanceId, other.serviceInstanceId)
177                     && isEqual(networkId, other.networkId) && isEqual(startTime, other.startTime)
178                     && isEqual(endTime, other.endTime) && isEqual(requestStatus, other.requestStatus)
179                     && isEqual(serviceInstanceName, other.serviceInstanceName)
180                     && isEqual(serviceType, other.serviceType);
181         }
182
183         return false;
184     }
185
186     @JsonIgnore
187     @Override
188     public String toString() {
189         return "SoActiveInfraRequests [requestId=" + requestId + ", serviceInstanceId=" + serviceInstanceId
190                 + ", networkId=" + networkId + ", startTime=" + startTime + ", endTime=" + endTime + ", requestStatus="
191                 + requestStatus + ", serviceInstanceName=" + serviceInstanceName + ", serviceType=" + serviceType + "]";
192     }
193
194
195
196 }